Initialize fresh project without Clerk
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { useContext } from 'react';
|
||||
import { AuthContext } from './AuthContextType';
|
||||
|
||||
export const useAuth = () => {
|
||||
const context = useContext(AuthContext);
|
||||
if (!context) {
|
||||
throw new Error('useAuth must be used within an AuthProvider');
|
||||
}
|
||||
return context;
|
||||
};
|
||||
Reference in New Issue
Block a user