feat: agency portfolio with per-client integrations hub
Admin home lists tenants, alerts, and connection health; header selector enables superadmin context; Meta/GA4/GSC/GTM/CRM/email slots live per tenant (manual status until OAuth). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
import { redirect } from 'next/navigation';
|
||||
import { createClient } from '@/lib/supabase/server';
|
||||
import { isAgencyRole, userRole } from '@/lib/agency';
|
||||
|
||||
export default function DashboardIndex() {
|
||||
export default async function DashboardIndex() {
|
||||
const supabase = await createClient();
|
||||
const {
|
||||
data: { user },
|
||||
} = await supabase.auth.getUser();
|
||||
if (user && isAgencyRole(userRole(user))) {
|
||||
redirect('/dashboard/agencia');
|
||||
}
|
||||
redirect('/dashboard/kpis');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user