// frontend/components/calendar/MiniCal.tsx — 미니 달력 (실제 날짜 기반) "use client"; import { Icon } from "@/components/Icon"; import { dayNum, monthCells, monthNum, yearNum } from "@/lib/calendar/time"; export function MiniCal({ monthRef, sel, today, weekdays, eventsByDate, onSel, onMonth, }: { monthRef: string; // 보여줄 달(ISO) sel: string; // 선택일(ISO) today: string; // 오늘(ISO) weekdays: string[]; eventsByDate: Record; onSel: (iso: string) => void; onMonth: (dir: number) => void; }) { const cells = monthCells(monthRef); return (
{yearNum(monthRef)}년 {monthNum(monthRef)}월
{weekdays.map((w) => (
{w}
))} {cells.map((c) => ( ))}
); }