feat(LOY-195): digital team member card button on my pages overview

This commit is contained in:
Christian Andolf
2025-05-05 11:02:33 +02:00
parent 09a4637556
commit 7359ab4afd
11 changed files with 82 additions and 3 deletions

View File

@@ -0,0 +1,37 @@
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { env } from "@/env/server"
import { getIntl } from "@/i18n"
import styles from "./digitalTeamMemberCard.module.css"
import type { User } from "@/types/user"
interface DigitalTeamMemberCardProps {
user: User
}
export default async function DigitalTeamMemberCard(
// TODO: Make a check whether user is eligible for benefits or not
_props: DigitalTeamMemberCardProps
) {
if (!env.ENABLE_DTMC) {
return null
}
const intl = await getIntl()
return (
<button className={styles.card} type="button">
<Typography variant="Body/Paragraph/mdBold">
<span className={styles.text}>
{/* @ts-expect-error Icon is supported in font, just not in React Material Symbols package */}
<MaterialIcon icon="id_card" size={24} color="CurrentColor" />
{intl.formatMessage({ defaultMessage: "Show Team Member Card" })}
</span>
</Typography>
</button>
)
}