Add ensureSupabase helper

cgen-979e81e5a48a4c67904db267282a72dd
This commit is contained in:
Builder.io 2025-09-30 22:51:44 +00:00
parent 78254e1e40
commit b977c3c675

View file

@ -21,6 +21,14 @@ export interface AethexUserProfile extends UserProfile {
const isNonEmptyString = (value: unknown): value is string =>
typeof value === "string" && value.trim().length > 0;
const ensureSupabase = () => {
if (!isSupabaseConfigured) {
throw new Error(
"Supabase is not configured. Please set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY.",
);
}
};
export function checkProfileComplete(p?: AethexUserProfile | null): boolean {
if (!p) return false;