'use client'; import { motion } from 'framer-motion'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { logout } from '@/features/auth'; import { toast } from 'react-hot-toast'; import { DollarSign, Users, ShoppingBag, Activity, ClipboardList, CheckCircle2, Clock, Hourglass, Bell, LogOut } from 'lucide-react'; // Mock Data for Demo const MOCK_STATS = [ { title: 'Total Revenue', value: '$45,231.89', change: '+20.1% from last month', icon: DollarSign, color: 'from-green-500/20 to-emerald-500/20', iconColor: 'text-green-500' }, { title: 'Subscriptions', value: '+2350', change: '+180.1% from last month', icon: Users, color: 'from-blue-500/20 to-indigo-500/20', iconColor: 'text-blue-500' }, { title: 'Sales', value: '+12,234', change: '+19% from last month', icon: ShoppingBag, color: 'from-orange-500/20 to-red-500/20', iconColor: 'text-orange-500' }, { title: 'Active Now', value: '+573', change: '+201 since last hour', icon: Activity, color: 'from-purple-500/20 to-pink-500/20', iconColor: 'text-purple-500' }, ]; const MOCK_TODOS = [ { id: 1, title: 'Review project proposal', status: 'completed', date: 'Today, 10:00 AM' }, { id: 2, title: 'Team meeting with design team', status: 'pending', date: 'Today, 2:00 PM' }, { id: 3, title: 'Update documentation', status: 'in-progress', date: 'Tomorrow, 11:00 AM' }, { id: 4, title: 'Deploy to production', status: 'pending', date: 'Wed, 4:00 PM' }, ]; const MOCK_ACTIVITIES = [ { id: 1, user: 'Alice Smith', action: 'created a new project', time: '2 min ago' }, { id: 2, user: 'Bob Johnson', action: 'commented on task #123', time: '15 min ago' }, { id: 3, user: 'Charlie Brown', action: 'completed onboarding', time: '1 hour ago' }, ]; export function DashboardView() { const handleLogout = async () => { await logout(); toast.success('Logged out successfully'); }; const container = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.1 } } }; const item = { hidden: { y: 20, opacity: 0 }, show: { y: 0, opacity: 1 } }; return (
Welcome back, Ziad! Here's what's happening today.
{stat.change}
{todo.title}
{activity.user} {activity.action}
{activity.time}