Files
web/apps/scandic-web/components/DigitalTeamMemberCard/EmployeeBenefits/AuthCard/index.tsx
Hrishikesh Vaipurkar 260a544c99 Merged in chore/SW-3381-move-loginbutton-to-ds- (pull request #2752)
chore(SW-3381) Moved LoginButton to design system

* chore(SW-3381) Moved LoginButton to design system


Approved-by: Anton Gunnarsson
2025-09-03 09:11:28 +00:00

45 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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({
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"
/>
)
}