mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-14 00:46:39 +00:00
enable 2fa flow
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { UserContext } from "@app/contexts/userContext";
|
||||
import UserContext from "@app/contexts/userContext";
|
||||
import { useContext } from "react";
|
||||
|
||||
export function useUserContext() {
|
||||
const user = useContext(UserContext);
|
||||
return user;
|
||||
export function userUserContext() {
|
||||
const context = useContext(UserContext);
|
||||
if (context === undefined) {
|
||||
throw new Error("useUserContext must be used within a UserProvider");
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user