"use client" import { useParams } from "next/navigation" import { Check } from "react-feather" import { Lang } from "@/constants/languages" import { _ } from "@/lib/translation" import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" import Link from "@/components/TempDesignSystem/Link" import Title from "@/components/TempDesignSystem/Title" import levelsData from "./data" import styles from "./loyaltyLevels.module.css" import type { Level, LevelCardProps } from "@/types/components/loyalty/blocks" export default function LoyaltyLevels() { const { lang } = useParams() const { levels } = levelsData[lang as Lang] return (
{levels.map((level: Level) => ( ))}
) } function LevelCard({ level }: LevelCardProps) { const { lang } = useParams() const pointsString = `${level.requiredPoints.toLocaleString(lang)}p` const qualifications = level.requiredNights ? `${pointsString} ${_("or")} ${level.requiredNights} ${_("nights")}` : pointsString return (
{level.tier} {level.name}

{qualifications}

{level.benefits.map((benefit) => (

{benefit.title}

))}
) }