"use client" import { BarChart3 } from "lucide-react" import { ChartCardShell } from "@/shared/components/charts/chart-card-shell" import { TrendLineChart } from "@/shared/components/charts/trend-line-chart" import { formatDate } from "@/shared/lib/utils" import type { GradeTrendResult } from "@/modules/grades/types" interface GradeTrendChartProps { data: GradeTrendResult | null } export function GradeTrendChart({ data }: GradeTrendChartProps) { const isEmpty = !data || data.points.length === 0 const chartData = isEmpty ? [] : data.points.map((p) => ({ title: p.title, normalizedScore: p.normalizedScore, fullTitle: p.title, date: formatDate(p.date), rawScore: p.score, fullScore: p.fullScore, type: p.type, })) return ( ) }