diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx
index 26d8754..15a8ccb 100644
--- a/app/dashboard/page.tsx
+++ b/app/dashboard/page.tsx
@@ -1,719 +1,243 @@
-'use client';
-
-import { useState } from 'react';
-import {
- LayoutDashboardIcon,
- CreditCardIcon,
- ArrowUpRightIcon,
- SettingsIcon,
- HelpCircleIcon,
- UsersIcon,
- SearchIcon,
- ChevronDownIcon,
- UploadIcon,
- DownloadIcon,
- TrendingUpIcon,
- TrendingDownIcon,
- MenuIcon,
- XIcon,
- ChevronLeftIcon,
- ChevronRightIcon,
-} from 'lucide-react';
import { ThemeSwitch } from '@/components/shared/ThemeSwitch';
+import {
+ accountItems,
+ budgetItems,
+ cashFlowData,
+ dashboardKpis,
+ dashboardNavLinks,
+ recentTransactions,
+} from '@/data/dashboard/mockData';
+import { PlusIcon } from 'lucide-react';
+import type { Metadata } from 'next';
+
+export const metadata: Metadata = {
+ title: 'Dashboard',
+};
+
+const maxCashFlow = Math.max(
+ ...cashFlowData.flatMap((point) => [point.income, point.spent]),
+);
export default function DashboardPage() {
- const [sidebarOpen, setSidebarOpen] = useState(false);
- const [balanceView, setBalanceView] = useState<'weekly' | 'monthly'>(
- 'weekly',
- );
- const [currentPage, setCurrentPage] = useState(1);
- const itemsPerPage = 6;
-
- // Mock transaction data
- const transactions = [
- {
- id: 'PAY-001',
- amount: 1250.0,
- to: 'Acme Corp',
- period: 'Jan 1 - Jan 31',
- method: 'Credit Card',
- date: 'Jan 31, 2024',
- status: 'received' as const,
- },
- {
- id: 'PAY-002',
- amount: 890.5,
- to: 'Tech Solutions',
- period: 'Feb 1 - Feb 28',
- method: 'Bank Transfer',
- date: 'Feb 28, 2024',
- status: 'processed' as const,
- },
- {
- id: 'PAY-003',
- amount: 2100.0,
- to: 'Global Services',
- period: 'Mar 1 - Mar 31',
- method: 'Credit Card',
- date: 'Mar 31, 2024',
- status: 'received' as const,
- },
- {
- id: 'PAY-004',
- amount: 450.75,
- to: 'Local Vendor',
- period: 'Apr 1 - Apr 30',
- method: 'PayPal',
- date: 'Apr 15, 2024',
- status: 'failed' as const,
- },
- {
- id: 'PAY-005',
- amount: 3200.0,
- to: 'Enterprise Inc',
- period: 'May 1 - May 31',
- method: 'Wire Transfer',
- date: 'May 30, 2024',
- status: 'processed' as const,
- },
- {
- id: 'PAY-006',
- amount: 675.25,
- to: 'Startup Labs',
- period: 'Jun 1 - Jun 30',
- method: 'Credit Card',
- date: 'Jun 28, 2024',
- status: 'received' as const,
- },
- {
- id: 'PAY-007',
- amount: 1820.0,
- to: 'Digital Agency',
- period: 'Jul 1 - Jul 31',
- method: 'Bank Transfer',
- date: 'Jul 29, 2024',
- status: 'processed' as const,
- },
- {
- id: 'PAY-008',
- amount: 990.5,
- to: 'Cloud Services',
- period: 'Aug 1 - Aug 31',
- method: 'Credit Card',
- date: 'Aug 30, 2024',
- status: 'received' as const,
- },
- ];
-
- const totalPages = Math.ceil(transactions.length / itemsPerPage);
- const paginatedTransactions = transactions.slice(
- (currentPage - 1) * itemsPerPage,
- currentPage * itemsPerPage,
- );
-
- const chartData =
- balanceView === 'weekly'
- ? [
- { label: 'Mon', value: 2400 },
- { label: 'Tue', value: 1800 },
- { label: 'Wed', value: 3200 },
- { label: 'Thu', value: 4200 },
- { label: 'Fri', value: 3600 },
- { label: 'Sat', value: 2800 },
- { label: 'Sun', value: 2200 },
- ]
- : [
- { label: 'Jan', value: 12400 },
- { label: 'Feb', value: 15800 },
- { label: 'Mar', value: 18200 },
- { label: 'Apr', value: 21200 },
- { label: 'May', value: 19600 },
- { label: 'Jun', value: 17800 },
- ];
-
- const maxValue = Math.max(...chartData.map((d) => d.value));
-
return (
-
- {/* Outer Shell Container */}
-
-
- {/* Sidebar */}
-