import { auth } from "@/auth" import ArrowRight from "@/components/Icons/ArrowRight" 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()]) // Check if we valid session, that means we are logged in. if (isValidSession(session)) { return null } return (
{block.title} {block.preamble ? ( {block.preamble} ) : null} {block.button ? ( ) : null}
{intl.formatMessage({ id: "Already a friend?" })} {intl.formatMessage({ id: "Log in here" })}
{block.contact ? : null}
) }