feat: Upgrade to Next.js 16.1 & React 19.2, migrate to Supabase SSR with async client handling

This commit is contained in:
2025-12-19 20:31:46 +01:00
parent d9b44a0ec5
commit 24e243fff8
49 changed files with 942 additions and 852 deletions

View File

@@ -1,13 +1,12 @@
export const dynamic = 'force-dynamic';
import { createServerComponentClient } from '@supabase/auth-helpers-nextjs';
import { cookies } from 'next/headers';
import { createClient } from '@/lib/supabase/server';
import { redirect } from 'next/navigation';
import { checkIsAdmin, getGlobalApiStats } from '@/services/track-api-usage';
import { BarChart3, TrendingUp, Users, Calendar, AlertCircle } from 'lucide-react';
import Link from 'next/link';
export default async function AdminPage() {
const supabase = createServerComponentClient({ cookies });
const supabase = await createClient();
const { data: { user } } = await supabase.auth.getUser();
console.log('[Admin Page] User:', user?.id, user?.email);