Feat(WEB-359): Update section link for mobile Approved-by: Chuma Mcphoy (We Ahead) Approved-by: Arvid Norlin
32 lines
900 B
TypeScript
32 lines
900 B
TypeScript
import { serverClient } from "@/lib/trpc/server"
|
|
|
|
import SectionContainer from "@/components/Section/Container"
|
|
import SectionHeader from "@/components/Section/Header"
|
|
import SectionLink from "@/components/Section/Link"
|
|
|
|
import ClientPreviousStays from "./Client"
|
|
|
|
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
|
|
|
export default async function PreviousStays({
|
|
lang,
|
|
title,
|
|
subtitle,
|
|
link,
|
|
}: AccountPageComponentProps) {
|
|
const initialPreviousStays = await serverClient().user.stays.previous()
|
|
if (!initialPreviousStays?.data) {
|
|
return null
|
|
}
|
|
return (
|
|
<SectionContainer>
|
|
<SectionHeader title={title} subtitle={subtitle} link={link} />
|
|
<ClientPreviousStays
|
|
initialPreviousStays={initialPreviousStays}
|
|
lang={lang}
|
|
/>
|
|
<SectionLink link={link} variant="mobile" />
|
|
</SectionContainer>
|
|
)
|
|
}
|