mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-02 16:56:39 +00:00
Edit client page done
This commit is contained in:
10
src/hooks/useClientContext.ts
Normal file
10
src/hooks/useClientContext.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user