refactor: reuse query code for both loyalty and account pages

This commit is contained in:
Matilda Landström
2024-05-27 16:13:44 +02:00
parent 0b694f6a74
commit fb4fbb1cbd
9 changed files with 150 additions and 271 deletions

View File

@@ -1,4 +1,5 @@
import { serverClient } from "@/lib/trpc/server"
import { PageTypes } from "@/server/routers/contentstack/breadcrumbs/input"
import { auth } from "@/auth"
import { Blocks } from "@/components/Loyalty/Blocks"
@@ -18,7 +19,7 @@ export default async function LoyaltyPage({ lang }: LangParams) {
return (
<>
{session ? <Breadcrumbs b={true} /> : null}
{session && <Breadcrumbs pageType={PageTypes.Loyalty} />}
<section className={styles.content}>
{session ? (
<Sidebar lang={lang} />