feat: static my stays
This commit is contained in:
28
components/MyPages/Blocks/Stays/Previous/index.tsx
Normal file
28
components/MyPages/Blocks/Stays/Previous/index.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import EmptyPreviousStaysBlock from "../EmptyPreviousStays"
|
||||
import Header from "../Header"
|
||||
import StayList from "../StayList"
|
||||
|
||||
import styles from "./previous.module.css"
|
||||
|
||||
import type { LangParams } from "@/types/params"
|
||||
|
||||
export default async function PreviousStays({ lang }: LangParams) {
|
||||
const stays = await serverClient().user.stays.previous()
|
||||
|
||||
return (
|
||||
<section className={styles.container}>
|
||||
<Header
|
||||
title="Your previous stays."
|
||||
subtitle="Revisit your stays and rekindle those our moments together, with ease."
|
||||
></Header>
|
||||
|
||||
{stays.length ? (
|
||||
<StayList lang={lang} stays={stays} />
|
||||
) : (
|
||||
<EmptyPreviousStaysBlock />
|
||||
)}
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.container {
|
||||
max-width: var(--max-width);
|
||||
}
|
||||
Reference in New Issue
Block a user