prettier fix
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import type { Provider } from '@supabase/supabase-js';
|
||||
import { getCachedAuthConfig } from '../config/dynamic-auth.config';
|
||||
|
||||
import { authConfig } from '../config';
|
||||
import { getCachedAuthConfig } from '../config/dynamic-auth.config';
|
||||
|
||||
interface AuthConfig {
|
||||
providers: {
|
||||
@@ -33,7 +35,9 @@ export function useAuthConfig(): UseAuthConfigResult {
|
||||
setConfig(authConfig);
|
||||
} catch (err) {
|
||||
console.error('Failed to fetch auth config', err);
|
||||
setError(err instanceof Error ? err : new Error('Failed to fetch auth config'));
|
||||
setError(
|
||||
err instanceof Error ? err : new Error('Failed to fetch auth config'),
|
||||
);
|
||||
setConfig(authConfig);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
@@ -52,7 +56,9 @@ export function useAuthConfig(): UseAuthConfigResult {
|
||||
};
|
||||
}
|
||||
|
||||
export function useProviderEnabled(provider: 'password' | 'magicLink' | Provider) {
|
||||
export function useProviderEnabled(
|
||||
provider: 'password' | 'magicLink' | Provider,
|
||||
) {
|
||||
const { config, loading, error } = useAuthConfig();
|
||||
|
||||
const isEnabled = (() => {
|
||||
|
||||
Reference in New Issue
Block a user