feat: add blocks for loyalty page

This commit is contained in:
Christel Westerberg
2024-04-23 16:54:34 +02:00
parent fc0e5aed02
commit 2ddabf1e50
22 changed files with 418 additions and 109 deletions

View File

@@ -0,0 +1,25 @@
import { serverClient } from "@/lib/trpc/server"
import { getValueFromContactConfig } from "@/utils/contactConfig"
import styles from "./contactRow.module.css"
import { Lang } from "@/constants/languages"
import type { ContactFields } from "@/types/requests/contactConfig"
export default async function ContactRow({
contact,
}: {
contact: ContactFields
}) {
const data = await serverClient().contentstack.contactConfig.get({
lang: Lang.en,
})
const val = getValueFromContactConfig(contact.contact_field, data)
return (
<div className={styles.container}>
<h4 className={styles.title}>{contact.display_text}</h4>
<p className={styles.value}>{val}</p>
</div>
)
}