fix: webview - mystay - check if we have webviewToken * fix: webview - mystay - check if we have webviewToken * Cleanup Approved-by: Joakim Jäderberg
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { login } from "@/constants/routes/handleAuth"
|
||
import { signup } from "@/constants/routes/signup"
|
||
|
||
import Card from "@/components/TempDesignSystem/Card"
|
||
import { getIntl } from "@/i18n"
|
||
import { getLang } from "@/i18n/serverContext"
|
||
import { isLoggedInUser } from "@/utils/isLoggedInUser"
|
||
|
||
import styles from "./authCard.module.css"
|
||
|
||
export default async function EmployeeBenefitsAuthCard() {
|
||
const intl = await getIntl()
|
||
|
||
const lang = getLang()
|
||
|
||
const isLoggedIn = await isLoggedInUser()
|
||
|
||
if (isLoggedIn) {
|
||
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"
|
||
/>
|
||
)
|
||
}
|