import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" import { getIntl } from "@/i18n" import styles from "./statsSection.module.css" interface StatsSectionProps { earned: number remaining?: number showTrophy?: boolean } export default async function StatsSection({ earned, remaining, showTrophy = false, }: StatsSectionProps) { const intl = await getIntl() return (
{intl.formatMessage({ id: "myPages.pointsEarned", defaultMessage: "Points earned", })} {intl.formatNumber(earned)}
{showTrophy ? ( ) : ( <> {intl.formatMessage({ id: "myPages.leftToLevelUp", defaultMessage: "Left to level up", })} {intl.formatNumber(remaining ?? 0)} )}
) }