Merged in LOY-188-employee-benefit-call-to-actions (pull request #1954)

feat(LOY-188): dynamic content support in content pages headers & use in DTMC employee benefits page

* feat(LOY-188): add dynamic content handling for DTMC employee benefits page header

* fix(LOY-188): change section to div in EmployeeBenefitsCallToActions component

* refactor(LOY-188): switch to ButtonLink

* refactor(LOY-188): replace enum with as const objects in DynamicContentEnum

* chore(LOY-188): change ComponentValue type exports to internal scope in DynamicContentEnum

* fix(EmployeeBenefitsCallToActions): replace div with fragment

* chore(LOY-188): update translations


Approved-by: Christian Andolf
This commit is contained in:
Chuma Mcphoy (We Ahead)
2025-05-08 15:24:22 +00:00
parent 494f44f216
commit 7af4d3be1e
12 changed files with 217 additions and 51 deletions

View File

@@ -0,0 +1,3 @@
.card {
border: 1px solid var(--Base-Border-Subtle);
}

View File

@@ -0,0 +1,44 @@
import { login } from "@/constants/routes/handleAuth"
import { signup } from "@/constants/routes/signup"
import { auth } from "@/auth"
import Card from "@/components/TempDesignSystem/Card"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
import { isValidSession } from "@/utils/session"
import styles from "./authCard.module.css"
export default async function EmployeeBenefitsAuthCard() {
const session = await auth()
const intl = await getIntl()
const lang = getLang()
if (isValidSession(session)) {
return null
}
return (
<Card
className={styles.card}
scriptedTopTitle={intl.formatMessage({
defaultMessage: "Lets be friends!",
})}
heading={intl.formatMessage({
defaultMessage: "Join our loyalty program today!",
})}
primaryButton={{
href: login[lang],
title: intl.formatMessage({ defaultMessage: "Log in" }),
openInNewTab: false,
}}
secondaryButton={{
href: signup[lang],
title: intl.formatMessage({ defaultMessage: "Sign up" }),
openInNewTab: false,
}}
theme="primaryInverted"
/>
)
}