Fix: Resolve 'useState' error in AuthProvider
The error "TypeError: Cannot read properties of null (reading 'useState')" indicates an issue with the `useState` hook within the `AuthProvider` component. This commit addresses the root cause of this error, ensuring the component functions correctly.
This commit is contained in:
@@ -105,5 +105,3 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
|
||||
|
||||
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
|
||||
};
|
||||
|
||||
// useAuth 후크는 useAuth.ts 파일로 이동했습니다
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
import { useContext, createContext } from 'react';
|
||||
import { AuthContextType } from './types';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user