import { AlignLeftIcon, FileTextIcon, SearchIcon, UsersIcon, } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '@/shared/ui/card'; type PostStatsCardsProps = { total: number; filtered: number; authorCount: number; avgLength: number; }; export const PostStatsCards = ({ total, filtered, authorCount, avgLength, }: PostStatsCardsProps) => { const items = [ { label: '전체 글', value: `${total.toLocaleString()}건`, Icon: FileTextIcon, }, { label: '검색 결과', value: `${filtered.toLocaleString()}건`, Icon: SearchIcon, }, { label: '작성자 수', value: `${authorCount.toLocaleString()}명`, Icon: UsersIcon, }, { label: '평균 본문 길이', value: `${avgLength.toLocaleString()}자`, Icon: AlignLeftIcon, }, ]; return (
{items.map(({ label, value, Icon }) => ( {label}

{value}

))}
); };