mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-23 22:14:10 +02:00
refactor contexts, format zod errors, and more refactoring
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import OrgContext from "@app/contexts/orgContext";
|
||||
import { useContext } from "react";
|
||||
|
||||
export function useOrgContext() {
|
||||
const context = useContext(OrgContext);
|
||||
if (context === undefined) {
|
||||
throw new Error("useOrgContext must be used within a OrgProvider");
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Reference in New Issue
Block a user