mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-01 15:49:08 +00:00
11 lines
303 B
TypeScript
11 lines
303 B
TypeScript
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;
|
|
}
|