Feat/lokalise rebuild * chore(lokalise): update translation ids * chore(lokalise): easier to switch between projects * chore(lokalise): update translation ids * . * . * . * . * . * . * chore(lokalise): update translation ids * chore(lokalise): update translation ids * . * . * . * chore(lokalise): update translation ids * chore(lokalise): update translation ids * . * . * chore(lokalise): update translation ids * chore(lokalise): update translation ids * chore(lokalise): new translations * merge * switch to errors for missing id's * merge * sync translations Approved-by: Linus Flood
53 lines
1.3 KiB
TypeScript
53 lines
1.3 KiB
TypeScript
import { login } from "@scandic-hotels/common/constants/routes/handleAuth"
|
||
import { signup } from "@scandic-hotels/common/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 = await getLang()
|
||
|
||
const isLoggedIn = await isLoggedInUser()
|
||
|
||
if (isLoggedIn) {
|
||
return null
|
||
}
|
||
|
||
return (
|
||
<Card
|
||
className={styles.card}
|
||
scriptedTopTitle={intl.formatMessage({
|
||
id: "dtmc.letsBeFriends",
|
||
defaultMessage: "Let’s be friends!",
|
||
})}
|
||
heading={intl.formatMessage({
|
||
id: "dtmc.joinLoyaltyProgram",
|
||
defaultMessage: "Join our loyalty program today!",
|
||
})}
|
||
primaryButton={{
|
||
href: login[lang],
|
||
title: intl.formatMessage({
|
||
id: "dtmc.logIn",
|
||
defaultMessage: "Log in",
|
||
}),
|
||
openInNewTab: false,
|
||
}}
|
||
secondaryButton={{
|
||
href: signup[lang],
|
||
title: intl.formatMessage({
|
||
id: "common.signUp",
|
||
defaultMessage: "Sign up",
|
||
}),
|
||
openInNewTab: false,
|
||
}}
|
||
theme="primaryInverted"
|
||
/>
|
||
)
|
||
}
|