mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-10 04:47:11 +02:00
change user role
This commit is contained in:
parent
e141263b7e
commit
1a3d7705d9
14 changed files with 320 additions and 306 deletions
12
src/hooks/useOrgUserContext.ts
Normal file
12
src/hooks/useOrgUserContext.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import OrgUserContext from "@app/contexts/orgUserContext";
|
||||
import { useContext } from "react";
|
||||
|
||||
export function userOrgUserContext() {
|
||||
const context = useContext(OrgUserContext);
|
||||
if (context === undefined) {
|
||||
throw new Error(
|
||||
"useOrgUserContext must be used within a OrgUserProvider"
|
||||
);
|
||||
}
|
||||
return context;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue