chore: add mypages navigation sidebar to loyalty page
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
.layout {
|
||||
--header-height: 4.5rem;
|
||||
|
||||
display: grid;
|
||||
font-family: var(--ff-fira-sans);
|
||||
background-color: var(--Scandic-Brand-Warm-White);
|
||||
grid-template-rows: var(--header-height) auto 1fr;
|
||||
}
|
||||
|
||||
@@ -2,27 +2,34 @@ import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { auth } from "@/auth"
|
||||
import { Blocks } from "@/components/Loyalty/Blocks"
|
||||
import Sidebar from "@/components/Loyalty/Sidebar"
|
||||
import * as LoyaltySidebar from "@/components/Loyalty/Sidebar"
|
||||
import MaxWidth from "@/components/MaxWidth"
|
||||
import Sidebar from "@/components/MyPages/Sidebar"
|
||||
|
||||
import Breadcrumbs from "../MyPages/Breadcrumbs"
|
||||
|
||||
import styles from "./loyaltyPage.module.css"
|
||||
|
||||
export default async function LoyaltyPage() {
|
||||
import { LangParams } from "@/types/params"
|
||||
|
||||
export default async function LoyaltyPage({ lang }: LangParams) {
|
||||
const loyaltyPage = await serverClient().contentstack.loyaltyPage.get()
|
||||
const session = await auth()
|
||||
|
||||
return (
|
||||
<section className={styles.content}>
|
||||
{session && <Breadcrumbs b={true} />}
|
||||
{loyaltyPage.sidebar.length ? (
|
||||
<Sidebar blocks={loyaltyPage.sidebar} />
|
||||
) : null}
|
||||
<>
|
||||
{session ? <Breadcrumbs b={true} /> : null}
|
||||
<section className={styles.content}>
|
||||
{session ? (
|
||||
<Sidebar lang={lang} />
|
||||
) : loyaltyPage.sidebar.length ? (
|
||||
<LoyaltySidebar.default blocks={loyaltyPage.sidebar} />
|
||||
) : null}
|
||||
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
{loyaltyPage.blocks ? <Blocks blocks={loyaltyPage.blocks} /> : null}
|
||||
</MaxWidth>
|
||||
</section>
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
{loyaltyPage.blocks ? <Blocks blocks={loyaltyPage.blocks} /> : null}
|
||||
</MaxWidth>
|
||||
</section>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user