import { serverClient } from "@/lib/trpc/server" import LoginButton from "@/components/Current/Header/LoginButton" import ArrowRight from "@/components/Icons/ArrowRight" import { ScandicFriends } from "@/components/Levels" 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 Contact from "./Contact" import styles from "./joinLoyalty.module.css" import type { JoinLoyaltyContactProps } from "@/types/components/loyalty/sidebar" export default async function JoinLoyaltyContact({ block, }: JoinLoyaltyContactProps) { const { formatMessage } = await getIntl() const user = await serverClient().user.name() // Check if we have user, that means we are logged in. if (user) { return null } return (
{block.title} {block.preamble ? {block.preamble} : null} {block.button ? ( ) : null}
{formatMessage({ id: "Already a friend?" })} {formatMessage({ id: "Log in here" })}
{block.contact ? : null}
) }