feat: add blocks for loyalty page
This commit is contained in:
@@ -1,8 +1,25 @@
|
||||
import { Lang } from "@/constants/languages"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
import Title from "@/components/Title"
|
||||
import ContactRow from "./ContactRow"
|
||||
|
||||
export default function Contact({ lang }: { lang: Lang }) {
|
||||
const data = serverClient().contentstack.contactConfig.get({ lang })
|
||||
import styles from "./contact.module.css"
|
||||
|
||||
return <div></div>
|
||||
import { JoinLoyaltyContactTypenameEnum } from "@/types/requests/loyaltyPage"
|
||||
import type { ContactProps } from "@/types/components/loyalty/sidebar"
|
||||
|
||||
export default async function Contact({ contactBlock }: ContactProps) {
|
||||
return (
|
||||
<div className={styles.contactContainer}>
|
||||
<Title level="h5">Contact us</Title>
|
||||
<section>
|
||||
{contactBlock.map(({ contact, __typename }) => {
|
||||
switch (__typename) {
|
||||
case JoinLoyaltyContactTypenameEnum.LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact:
|
||||
return <ContactRow contact={contact} />
|
||||
default:
|
||||
return null
|
||||
}
|
||||
})}
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user