import { getHighestLevel } from "@/utils/loyaltyTable" import BenefitCard from "../BenefitCard" import styles from "./benefitList.module.css" import { BenefitListProps } from "@/types/components/loyalty/blocks" export default function BenefitList({ levels }: BenefitListProps) { const highestLevel = getHighestLevel(levels) return highestLevel?.benefits .filter((benefit) => benefit.unlocked) .map((benefit, idx) => { const levelBenefits = levels.map((level) => level.benefits[idx]) return (