mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-29 06:08:15 +02: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;
|
||
|
}
|