26 lines
812 B
TypeScript
26 lines
812 B
TypeScript
import Title from "@/components/Title"
|
|
import ContactRow from "./ContactRow"
|
|
|
|
import styles from "./contact.module.css"
|
|
|
|
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>
|
|
)
|
|
}
|