enable 2fa flow

This commit is contained in:
Milo Schwartz
2024-12-23 23:59:15 -05:00
parent b1afba191e
commit 9e50a580a5
33 changed files with 605 additions and 2084 deletions

View File

@@ -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;
}