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