fix up
This commit is contained in:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user