fix: remove session and sidebar
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import { auth } from "@/auth"
|
|
||||||
import { Blocks } from "@/components/Loyalty/Blocks"
|
import { Blocks } from "@/components/Loyalty/Blocks"
|
||||||
import SidebarLoyalty from "@/components/Loyalty/Sidebar"
|
import Sidebar 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"
|
||||||
|
|
||||||
@@ -14,16 +12,13 @@ import { LangParams } from "@/types/params"
|
|||||||
|
|
||||||
export default async function LoyaltyPage({ lang }: LangParams) {
|
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()
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Breadcrumbs />
|
<Breadcrumbs />
|
||||||
<section className={styles.content}>
|
<section className={styles.content}>
|
||||||
{session ? (
|
{loyaltyPage.sidebar.length ? (
|
||||||
<Sidebar lang={lang} />
|
<Sidebar blocks={loyaltyPage.sidebar} />
|
||||||
) : loyaltyPage.sidebar.length ? (
|
|
||||||
<SidebarLoyalty blocks={loyaltyPage.sidebar} />
|
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<MaxWidth className={styles.blocks} tag="main">
|
<MaxWidth className={styles.blocks} tag="main">
|
||||||
|
|||||||
Reference in New Issue
Block a user