From 401873b8bb0ca04eb5d7205e78d2ffb6d6552782 Mon Sep 17 00:00:00 2001 From: NotII <46204250+NotII@users.noreply.github.com> Date: Mon, 30 Jun 2025 18:38:51 +0100 Subject: [PATCH] fix up --- app/dashboard/analytics/page.tsx | 8 ++-- components/analytics/AnalyticsDashboard.tsx | 47 ------------------- .../analytics/ProductPerformanceChart.tsx | 7 +-- 3 files changed, 7 insertions(+), 55 deletions(-) diff --git a/app/dashboard/analytics/page.tsx b/app/dashboard/analytics/page.tsx index 8849f96..8189982 100644 --- a/app/dashboard/analytics/page.tsx +++ b/app/dashboard/analytics/page.tsx @@ -27,12 +27,15 @@ interface User { export default async function AnalyticsPage({ searchParams, }: { - searchParams: { storeId?: string }; + searchParams: Promise<{ storeId?: string }>; }) { const startTime = performance.now(); + // Await searchParams as required by Next.js 15+ + const resolvedSearchParams = await searchParams; + // Check for storeId in query parameters (for staff users) - const storeId = searchParams.storeId; + const storeId = resolvedSearchParams?.storeId; // Check for storeId in cookies (alternative method for staff users) const cookieStore = await cookies(); @@ -74,7 +77,6 @@ export default async function AnalyticsPage({ - {/* Footer with version info */}
- Detailed insights into your business performance -
-- Track your revenue performance over the selected time period -
-- Analyze which products are performing best (all-time data) -
-- Understand your customer base and behavior (all-time data) -
-- Order status distribution for the selected time period -
-