import { PieGraph } from '@/features/overview/components/pie-graph';
import { getOverviewDashboardData } from '@/features/overview/server/overview-data';

export default async function Stats() {
  const data = await getOverviewDashboardData();
  const total = data.hrd.ksaDistribution.reduce((sum, item) => sum + item.value, 0);

  return <PieGraph data={data.hrd.ksaDistribution} total={total} />;
}
