mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-03 16:43:45 +00:00
11 lines
304 B
TypeScript
11 lines
304 B
TypeScript
import EnvContext from "@app/contexts/envContext";
|
|
import { useContext } from "react";
|
|
|
|
export function useEnvContext() {
|
|
const context = useContext(EnvContext);
|
|
if (context === undefined) {
|
|
throw new Error("useEnvContext must be used within an EnvProvider");
|
|
}
|
|
return context;
|
|
}
|