This commit is contained in:
NotII
2025-06-30 18:38:51 +01:00
parent 84e4515a26
commit 401873b8bb
3 changed files with 7 additions and 55 deletions

View File

@@ -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({
</Suspense>
</div>
{/* Footer with version info */}
<div className="fixed bottom-2 right-2 text-xs text-muted-foreground bg-background/80 backdrop-blur-sm px-2 py-1 rounded border border-border/50 z-50 flex items-center space-x-2">
<div className="flex items-center gap-1">
<Info size={12} className="text-muted-foreground/80" />