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