import Body from "@scandic-hotels/design-system/Body" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Link from "@scandic-hotels/design-system/Link" import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton" import Title from "@scandic-hotels/design-system/Title" import { ScandicFriends } from "@/components/Levels" import LoginButton from "@/components/LoginButton" import { getIntl } from "@/i18n" import { isLoggedInUser } from "@/utils/isLoggedInUser" 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, isLoggedIn] = await Promise.all([getIntl(), isLoggedInUser()]) if (isLoggedIn) { 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}
) }