'use client' import { Invoice, Deadline } from '@/types' import { SWEDISH_DAYS, getMonthGrid } from '@/lib/calendar/utils' import { CalendarDayCell } from './CalendarDayCell' interface CalendarGridProps { year: number month: number invoices: Invoice[] deadlines: Deadline[] onDayClick: (date: Date) => void } export function CalendarGrid({ year, month, invoices, deadlines, onDayClick, }: CalendarGridProps) { const weeks = getMonthGrid(year, month) return (
{/* Day headers */}
{SWEDISH_DAYS.map((day) => (
{day}
))}
{/* Week rows */} {weeks.map((week, weekIndex) => (
{week.map((date, dayIndex) => ( ))}
))}
) }