diff --git a/client/pages/dashboards/FoundationDashboard.tsx b/client/pages/dashboards/FoundationDashboard.tsx index 2c70961f..e95ddb1c 100644 --- a/client/pages/dashboards/FoundationDashboard.tsx +++ b/client/pages/dashboards/FoundationDashboard.tsx @@ -49,7 +49,8 @@ export default function FoundationDashboard() { const loadDashboardData = async () => { try { setLoading(true); - const token = (await (window as any).supabaseClient.auth.getSession()).data?.session?.access_token; + const { data: { session } } = await supabase.auth.getSession(); + const token = session?.access_token; if (!token) throw new Error("No auth token"); // Load courses