feat: improve structure and error handling
This commit is contained in:
3
components/ContentType/ContentPage.tsx
Normal file
3
components/ContentType/ContentPage.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default async function ContentPage() {
|
||||
return null
|
||||
}
|
||||
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>
|
||||
)
|
||||
}
|
||||
31
components/ContentType/loyaltyPage.module.css
Normal file
31
components/ContentType/loyaltyPage.module.css
Normal file
@@ -0,0 +1,31 @@
|
||||
.content {
|
||||
display: grid;
|
||||
padding-bottom: 7.7rem;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blocks {
|
||||
display: grid;
|
||||
gap: 4.2rem;
|
||||
padding: 1.6rem;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 950px) {
|
||||
.content {
|
||||
gap: 2.7rem;
|
||||
grid-template-columns: 30rem 1fr;
|
||||
padding-bottom: 17.5rem;
|
||||
padding-left: 2.4rem;
|
||||
padding-right: 2.4rem;
|
||||
padding-top: 5.8rem;
|
||||
}
|
||||
|
||||
.blocks {
|
||||
gap: 6.4rem;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
grid-column: 2 / -1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user