Files
web/components/MyPages/Blocks/Stays/Previous/index.tsx
Michael Zetterberg 2f6500f46d feat: static my stays
2024-04-20 07:24:54 +02:00

29 lines
761 B
TypeScript

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>
)
}