mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-10 00:43:22 +00:00
11 lines
317 B
TypeScript
11 lines
317 B
TypeScript
import ClientContext from "@app/contexts/clientContext";
|
|
import { useContext } from "react";
|
|
|
|
export function useClientContext() {
|
|
const context = useContext(ClientContext);
|
|
if (context === undefined) {
|
|
throw new Error("useSiteContext must be used within a SiteProvider");
|
|
}
|
|
return context;
|
|
}
|