/**
 * Where each role lands after signing in on /login (the one login screen for the
 * whole site). The API currently has only admin roles; donor / partner / consumer
 * roles will land on the website until their dashboards exist — add them here.
 */
export const ADMIN_ROLES = ["super_admin", "admin"] as const;

export const isAdminRole = (role: string | null | undefined): boolean =>
  !!role && (ADMIN_ROLES as readonly string[]).includes(role);

export const homeForRole = (role: string | null | undefined): string => (isAdminRole(role) ? "/admin/dashboard" : "/");
