diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx index f0f3fff2..a2b2a774 100644 --- a/src/hooks/useAuth.tsx +++ b/src/hooks/useAuth.tsx @@ -17,7 +17,7 @@ interface AuthContextType { const AuthContext = createContext(undefined); -export function AuthProvider({ children }: { children: React.ReactNode }) { +function AuthProviderComponent({ children }: { children: React.ReactNode }) { const [user, setUser] = useState(null); const [session, setSession] = useState(null); const [profile, setProfile] = useState(null); @@ -232,6 +232,8 @@ export function AuthProvider({ children }: { children: React.ReactNode }) { return {children}; } +export const AuthProvider = AuthProviderComponent; + export function useAuth() { const context = useContext(AuthContext); if (context === undefined) {