import { useState } from 'react' import { cn } from '@/lib/utils' const GOAL_OPTIONS = [ { value: '10', label: '10p', sublabel: 'Dễ dàng' }, { value: '20', label: '20p', sublabel: 'Tiêu chuẩn' }, { value: '30', label: '30p', sublabel: 'Thử thách' }, { value: '60', label: '1h', sublabel: 'Chuyên sâu' }, ] const XP_MAP: Record = { '10': 20, '20': 50, '30': 80, '60': 120 } const STORAGE_KEY = 'settings_daily_goal' export function DailyGoalCard() { const [goal, setGoal] = useState(() => localStorage.getItem(STORAGE_KEY) ?? '20') function handleSelect(value: string) { setGoal(value) localStorage.setItem(STORAGE_KEY, value) } return (

target Mục tiêu hàng ngày

{GOAL_OPTIONS.map((opt) => { const active = goal === opt.value return ( ) })}
stars +{XP_MAP[goal]} XP mỗi ngày
) }