mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-18 07:26:27 +00:00
11 lines
309 B
TypeScript
11 lines
309 B
TypeScript
import SiteContext from "@app/contexts/siteContext";
|
|
import { useContext } from "react";
|
|
|
|
export function useSiteContext() {
|
|
const context = useContext(SiteContext);
|
|
if (context === undefined) {
|
|
throw new Error("useSiteContext must be used within a SiteProvider");
|
|
}
|
|
return context;
|
|
}
|