Merged in feat/LOY-201-Employee-benefits-auth-card-sidebar (pull request #1891)
Feat(LOY-201): Employee benefits auth card sidebar * feat(LOY-201): WIP - add EmployeeBenefitsAuthCard component to Sidebar and update dynamic content enum * feat(LOY-201): reorganize EmployeeBenefitsAuthCard * chore: remove debug console logs from DynamicContent handling Approved-by: Christian Andolf
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
.card {
|
||||
border: 1px solid var(--Base-Border-Subtle);
|
||||
}
|
||||
@@ -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: "Let’s 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"
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user