mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 22:16:40 +00:00
10 lines
308 B
TypeScript
10 lines
308 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;
|
|
} |