feat: improve structure and error handling
This commit is contained in:
21
components/ContentType/LoyaltyPage.tsx
Normal file
21
components/ContentType/LoyaltyPage.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { Blocks } from "@/components/Loyalty/Blocks"
|
||||
import Sidebar from "@/components/Loyalty/Sidebar"
|
||||
import MaxWidth from "@/components/MaxWidth"
|
||||
|
||||
import styles from "./loyaltyPage.module.css"
|
||||
|
||||
export default async function LoyaltyPage() {
|
||||
const loyaltyPage = await serverClient().contentstack.loyaltyPage.get()
|
||||
|
||||
return (
|
||||
<section className={styles.content}>
|
||||
{loyaltyPage.sidebar ? <Sidebar blocks={loyaltyPage.sidebar} /> : null}
|
||||
|
||||
<MaxWidth className={styles.blocks} tag="main">
|
||||
{loyaltyPage.blocks ? <Blocks blocks={loyaltyPage.blocks} /> : null}
|
||||
</MaxWidth>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user