feat: Add hotel page component
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { notFound } from "next/navigation"
|
import { notFound } from "next/navigation"
|
||||||
|
|
||||||
import ContentPage from "@/components/ContentType/ContentPage"
|
import ContentPage from "@/components/ContentType/ContentPage"
|
||||||
|
import HotelPage from "@/components/ContentType/HotelPage"
|
||||||
import LoyaltyPage from "@/components/ContentType/LoyaltyPage"
|
import LoyaltyPage from "@/components/ContentType/LoyaltyPage"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -18,6 +19,8 @@ export default async function ContentTypePage({
|
|||||||
return <ContentPage />
|
return <ContentPage />
|
||||||
case "loyalty-page":
|
case "loyalty-page":
|
||||||
return <LoyaltyPage lang={params.lang} />
|
return <LoyaltyPage lang={params.lang} />
|
||||||
|
case "hotel-page":
|
||||||
|
return <HotelPage lang={params.lang} />
|
||||||
default:
|
default:
|
||||||
const type: never = params.contentType
|
const type: never = params.contentType
|
||||||
console.error(`Unsupported content type given: ${type}`)
|
console.error(`Unsupported content type given: ${type}`)
|
||||||
|
|||||||
23
components/ContentType/HotelPage.tsx
Normal file
23
components/ContentType/HotelPage.tsx
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
|
import MaxWidth from "@/components/MaxWidth"
|
||||||
|
|
||||||
|
import Title from "../TempDesignSystem/Text/Title"
|
||||||
|
|
||||||
|
import styles from "./loyaltyPage.module.css"
|
||||||
|
|
||||||
|
import type { LangParams } from "@/types/params"
|
||||||
|
|
||||||
|
export default async function HotelPage({ lang }: LangParams) {
|
||||||
|
const hotelPage = await serverClient().contentstack.hotelPage.get()
|
||||||
|
if (!hotelPage) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<section className={styles.content}>
|
||||||
|
<MaxWidth className={styles.blocks} tag="main">
|
||||||
|
<Title>ID: {hotelPage.hotel_page_id}</Title>
|
||||||
|
</MaxWidth>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
31
components/ContentType/hotelPage.module.css
Normal file
31
components/ContentType/hotelPage.module.css
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
.content {
|
||||||
|
display: grid;
|
||||||
|
padding-bottom: var(--Spacing-x9);
|
||||||
|
padding-left: var(--Spacing-x0);
|
||||||
|
padding-right: var(--Spacing-x0);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blocks {
|
||||||
|
display: grid;
|
||||||
|
gap: var(--Spacing-x5);
|
||||||
|
padding-left: var(--Spacing-x2);
|
||||||
|
padding-right: var(--Spacing-x2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1367px) {
|
||||||
|
.content {
|
||||||
|
gap: var(--Spacing-x3);
|
||||||
|
padding-left: var(--Spacing-x3);
|
||||||
|
padding-right: var(--Spacing-x3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.blocks {
|
||||||
|
padding-left: var(--Spacing-x0);
|
||||||
|
padding-right: var(--Spacing-x0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.blocks > section:first-of-type > header {
|
||||||
|
gap: var(--Spacing-x2);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user