fix: remove session and sidebar

This commit is contained in:
Matilda Landström
2024-05-30 15:59:28 +02:00
parent c52275c536
commit f884383c3c

View File

@@ -1,10 +1,8 @@
import { serverClient } from "@/lib/trpc/server"
import { auth } from "@/auth"
import { Blocks } from "@/components/Loyalty/Blocks"
import SidebarLoyalty from "@/components/Loyalty/Sidebar"
import Sidebar from "@/components/Loyalty/Sidebar"
import MaxWidth from "@/components/MaxWidth"
import Sidebar from "@/components/MyPages/Sidebar"
import Breadcrumbs from "../MyPages/Breadcrumbs"
@@ -14,16 +12,13 @@ import { LangParams } from "@/types/params"
export default async function LoyaltyPage({ lang }: LangParams) {
const loyaltyPage = await serverClient().contentstack.loyaltyPage.get()
const session = await auth()
return (
<>
<Breadcrumbs />
<section className={styles.content}>
{session ? (
<Sidebar lang={lang} />
) : loyaltyPage.sidebar.length ? (
<SidebarLoyalty blocks={loyaltyPage.sidebar} />
{loyaltyPage.sidebar.length ? (
<Sidebar blocks={loyaltyPage.sidebar} />
) : null}
<MaxWidth className={styles.blocks} tag="main">