Refactored Supabase Clients using the new recommended approach by Supabase by centralizing all clients around one single implementation. (#51)
The previous clients have been marked as deprecated and will be removed at some point.
This commit is contained in:
committed by
GitHub
parent
2f0c4b4ae3
commit
ba6e649461
@@ -2,7 +2,7 @@ import 'server-only';
|
||||
|
||||
import { cache } from 'react';
|
||||
|
||||
import { getSupabaseServerComponentClient } from '@kit/supabase/server-component-client';
|
||||
import { getSupabaseServerClient } from '@kit/supabase/server-client';
|
||||
|
||||
import { createAdminDashboardService } from '../services/admin-dashboard.service';
|
||||
|
||||
@@ -14,7 +14,7 @@ import { createAdminDashboardService } from '../services/admin-dashboard.service
|
||||
export const loadAdminDashboard = cache(adminDashboardLoader);
|
||||
|
||||
function adminDashboardLoader() {
|
||||
const client = getSupabaseServerComponentClient({ admin: true });
|
||||
const client = getSupabaseServerClient();
|
||||
const service = createAdminDashboardService(client);
|
||||
|
||||
return service.getDashboardData();
|
||||
|
||||
Reference in New Issue
Block a user