'use client'; import { Area, AreaChart, CartesianGrid, XAxis } from 'recharts'; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from '@/components/ui/card'; import { ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, } from '@/components/ui/chart'; import { Skeleton } from '@/components/ui/skeleton'; const chartConfig = { views: { label: 'Views', color: 'hsl(var(--foreground))', }, } satisfies ChartConfig; export default function Engagement({ chartData, }: { chartData: | { week: string; views: number; }[] | null; }) { return ( Post engagement Showing engagements for the last week {chartData ? ( value.slice(0, 3)} /> } /> ) : ( )} ); }