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 -
-