feat: implement dashboard page for QR code listing, statistics, and management.

This commit is contained in:
Timo
2026-01-02 20:38:57 +01:00
parent 49673e84b6
commit eea8c8b33a
3 changed files with 22 additions and 10 deletions

View File

@@ -11,6 +11,7 @@ interface StatsGridProps {
totalScans: number;
activeQRCodes: number;
conversionRate: number;
uniqueScans?: number;
};
trends?: {
totalScans?: TrendData;
@@ -67,13 +68,13 @@ export const StatsGrid: React.FC<StatsGridProps> = ({ stats, trends }) => {
),
},
{
title: 'Unique Scan Rate',
value: `${stats.conversionRate}%`,
change: stats.totalScans > 0 ? `${stats.conversionRate}% new users` : 'No scans yet',
changeType: stats.conversionRate > 0 ? 'positive' : 'neutral' as 'positive' | 'negative' | 'neutral',
title: 'Unique Users',
value: formatNumber(stats.uniqueScans ?? 0),
change: stats.totalScans > 0 ? `${stats.uniqueScans ?? 0} unique visitors` : 'No scans yet',
changeType: (stats.uniqueScans ?? 0) > 0 ? 'positive' : 'neutral' as 'positive' | 'negative' | 'neutral',
icon: (
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6" />
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
),
},