← Back
import { usePrivy } from '@privy-io/react-auth';
import { isAdminEmail } from '../config/admins';

/** True when the logged-in Privy user's email is on the Builder Analytics allowlist. */
export function useIsAdmin(): boolean {
  const { authenticated, user } = usePrivy();
  return authenticated && isAdminEmail(user?.email?.address);
}

📜 Git History

6c47fa4chore: local Polikopi project home + Phase 1 redesign artifacts12 days ago
Show last diff
Loading...