mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-11 15:36:38 +00:00
initial setup for viewing domain details
This commit is contained in:
10
src/hooks/useDomainContext.ts
Normal file
10
src/hooks/useDomainContext.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import DomainContext from "@app/contexts/domainContext";
|
||||
import { useContext } from "react";
|
||||
|
||||
export function useDomainContext() {
|
||||
const context = useContext(DomainContext);
|
||||
if (context === undefined) {
|
||||
throw new Error('useDomainContext must be used within a DomainProvider');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Reference in New Issue
Block a user