mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-08 05:56:38 +00:00
10 lines
316 B
TypeScript
10 lines
316 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;
|
|
} |