feat: add card grid component
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import { notFound } from "next/navigation"
|
||||
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import MaxWidth from "@/components/MaxWidth"
|
||||
import Sidebar from "@/components/Loyalty/Sidebar"
|
||||
import { Blocks } from "@/components/Loyalty/Blocks"
|
||||
|
||||
import type { LangParams, PageArgs, UriParams } from "@/types/params"
|
||||
import Sidebar from "@/components/Loyalty/Sidebar"
|
||||
import MaxWidth from "@/components/MaxWidth"
|
||||
|
||||
import styles from "./page.module.css"
|
||||
|
||||
import type { LangParams, PageArgs, UriParams } from "@/types/params"
|
||||
|
||||
export default async function LoyaltyPage({
|
||||
params,
|
||||
searchParams,
|
||||
@@ -19,12 +20,12 @@ export default async function LoyaltyPage({
|
||||
}
|
||||
|
||||
const loyaltyPage = await serverClient().contentstack.loyaltyPage.get({
|
||||
uri: searchParams.uri,
|
||||
lang: params.lang,
|
||||
href: searchParams.uri,
|
||||
locale: params.lang,
|
||||
})
|
||||
|
||||
return (
|
||||
<MaxWidth className={styles.content} tag="main">
|
||||
<section className={styles.content}>
|
||||
<aside>
|
||||
{loyaltyPage.sidebar
|
||||
? loyaltyPage.sidebar.map((block, i) => (
|
||||
@@ -32,10 +33,10 @@ export default async function LoyaltyPage({
|
||||
))
|
||||
: null}
|
||||
</aside>
|
||||
<section className={styles.blocks}>
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
<Blocks blocks={loyaltyPage.blocks} />
|
||||
</section>
|
||||
</MaxWidth>
|
||||
</MaxWidth>
|
||||
</section>
|
||||
)
|
||||
} catch (err) {
|
||||
return notFound()
|
||||
|
||||
Reference in New Issue
Block a user