Merged in feat/LOY-421-Next-Stay (pull request #3026)

Feat(LOY-421): Next Stay

* feat(LOY-421): Next stay WIP

* fix(LOY-421): clean upp css and jsx

* chore(LOY-421): css cleanup

* fix(LOY-421): fix test

* only show button if isWebAppOrigin is true

* chore(LOY-421): update section header component

* chore(LOY-421): remove redundant test case


Approved-by: Matilda Landström
This commit is contained in:
Chuma Mcphoy (We Ahead)
2025-11-05 09:09:57 +00:00
parent 3a38e99a71
commit 94f6af563d
9 changed files with 678 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import { serverClient } from "@/lib/trpc/server"
import { Section } from "@/components/Section"
import { SectionHeader } from "@/components/Section/Header"
import SectionLink from "@/components/Section/Link"
import NextStayContent from "./NextStayContent"
import styles from "./nextStay.module.css"
import type { NextStayProps } from "./types"
export default async function NextStay({ title, link }: NextStayProps) {
const caller = await serverClient()
const nextStay = await caller.user.stays.next()
if (!nextStay) {
return null
}
return (
<Section className={styles.container}>
{title && <SectionHeader heading={title} link={link} />}
<NextStayContent nextStay={nextStay} />
{link && <SectionLink link={link} variant="mobile" />}
</Section>
)
}