mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-08 15:14:52 +02:00
migrate private resources to page
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import SiteResourceContext from "@app/contexts/siteResourceContext";
|
||||
import { useContext } from "react";
|
||||
|
||||
export function useSiteResourceContext() {
|
||||
const context = useContext(SiteResourceContext);
|
||||
if (!context) {
|
||||
throw new Error(
|
||||
"useSiteResourceContext must be used within SiteResourceProvider"
|
||||
);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Reference in New Issue
Block a user