feat: add communication preferences

feat: add generatePreferencesLink

feat: add subscriberId endpoint
This commit is contained in:
Christel Westerberg
2024-09-19 14:07:45 +02:00
parent 676b763e67
commit 2886084a82
17 changed files with 158 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
import { ArrowRightIcon } from "@/components/Icons"
import ManagePreferencesButton from "@/components/Profile/ManagePreferencesButton"
import Link from "@/components/TempDesignSystem/Link"
import Body from "@/components/TempDesignSystem/Text/Body"
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
@@ -27,12 +28,7 @@ export default async function CommunicationSlot({
})}
</Body>
</article>
<Link href="#" variant="icon">
<ArrowRightIcon color="burgundy" />
<Body color="burgundy" textTransform="underlined">
{formatMessage({ id: "Manage preferences" })}
</Body>
</Link>
<ManagePreferencesButton />
</section>
)
}

View File

@@ -1,4 +1,3 @@
import { env } from "@/env/server"
import { serverClient } from "@/lib/trpc/server"
import AddCreditCardButton from "@/components/Profile/AddCreditCardButton"
@@ -17,8 +16,6 @@ export default async function CreditCardSlot({ params }: PageArgs<LangParams>) {
const { formatMessage } = await getIntl()
const creditCards = await serverClient().user.creditCards()
const { lang } = params
return (
<section className={styles.container}>
<article className={styles.content}>

View File

@@ -15,8 +15,7 @@ export default function ProfileLayout({
{profile}
<Divider color="burgundy" opacity={8} />
{creditCards}
{/* TODO: Implement communication preferences flow. Hidden until decided on where to send user. */}
{/* {communication} */}
{communication}
</section>
</main>
)