feat: adding status archived and refacto type in one place only
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
import { Card, CardContent } from '@/components/ui/Card';
|
||||
import { TaskStats } from '@/lib/types';
|
||||
import Link from 'next/link';
|
||||
|
||||
interface HeaderProps {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
stats: {
|
||||
total: number;
|
||||
completed: number;
|
||||
inProgress: number;
|
||||
todo: number;
|
||||
cancelled: number;
|
||||
freeze: number;
|
||||
completionRate: number;
|
||||
};
|
||||
stats: TaskStats;
|
||||
syncing?: boolean;
|
||||
}
|
||||
|
||||
@@ -98,6 +91,13 @@ export function Header({ title, subtitle, stats, syncing = false }: HeaderProps)
|
||||
color="gray"
|
||||
/>
|
||||
)}
|
||||
{stats.archived > 0 && (
|
||||
<StatCard
|
||||
label="ARCHIVE"
|
||||
value={String(stats.archived).padStart(2, '0')}
|
||||
color="gray"
|
||||
/>
|
||||
)}
|
||||
<StatCard
|
||||
label="RATE"
|
||||
value={`${stats.completionRate}%`}
|
||||
|
||||
Reference in New Issue
Block a user