feat(WEB-205, WEB-206): get breadcrumbs for my pages from contentstack

This commit is contained in:
Simon Emanuelsson
2024-04-16 12:42:44 +02:00
parent b60f5c3858
commit b2e992c69a
31 changed files with 291 additions and 139 deletions

View File

@@ -13,12 +13,14 @@ import Field from "../Field"
import styles from "./profile.module.css"
import { serverClient } from "@/lib/trpc/server"
import { dt } from "@/lib/dt"
export default async function Profile() {
const user = await serverClient().user.get()
const countryName = countries.find(
(country) => country.code === user.address.country
)
const dob = dt(user.dateOfBirth).format("DD/MM/YYYY")
return (
<Container user={user}>
<section className={styles.info}>
@@ -32,8 +34,7 @@ export default async function Profile() {
<CalendarIcon />
</Field.Icon>
<Field.TextLabel>{_("Date of Birth")}</Field.TextLabel>
{/* TODO: Get this from user when API team adds it to payload */}
<Field.Content>27/05/1977</Field.Content>
<Field.Content>{dob}</Field.Content>
</Field>
<Field>
<Field.Icon>
@@ -61,7 +62,6 @@ export default async function Profile() {
<HouseIcon />
</Field.Icon>
<Field.TextLabel>{_("City/State")}</Field.TextLabel>
{/* TODO: Get this from user when API team adds it to payload */}
<Field.Content>{user.address.city || "-"}</Field.Content>
</Field>
<Field>