import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { auth } from "@/auth" import { ScandicFriends } from "@/components/Levels" import LoginButton from "@/components/LoginButton" import Button from "@/components/TempDesignSystem/Button" import Link from "@/components/TempDesignSystem/Link" import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { getIntl } from "@/i18n" import { isValidSession } from "@/utils/session" import Contact from "./Contact" import ReadMore from "./ReadMore" import styles from "./joinLoyalty.module.css" import type { JoinLoyaltyContactProps } from "@/types/components/sidebar/joinLoyaltyContact" export default async function JoinLoyaltyContact({ block, }: JoinLoyaltyContactProps) { const [intl, session] = await Promise.all([getIntl(), auth()]) if (isValidSession(session)) { return null } return (
{block.title} {block.preamble ? ( {block.preamble} ) : null} {block.button ? ( ) : null}
{intl.formatMessage({ defaultMessage: "Already a friend?", })} {intl.formatMessage({ defaultMessage: "Log in here", })}
{block.contact ? : null}
) }