mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-19 19:36:38 +00:00
ui and layout fix
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
import { GetDomainResponse } from "@server/routers/domain/getDomain";
|
||||
import { createContext } from "react";
|
||||
|
||||
import { createContext, useContext } from "react";
|
||||
interface DomainContextType {
|
||||
domain: GetDomainResponse;
|
||||
updateDomain: (updatedDomain: Partial<GetDomainResponse>) => void;
|
||||
orgId: string;
|
||||
}
|
||||
|
||||
const DomainContext = createContext<DomainContextType | undefined>(undefined);
|
||||
|
||||
export function useDomain() {
|
||||
const context = useContext(DomainContext);
|
||||
if (!context) {
|
||||
throw new Error("useDomain must be used within DomainProvider");
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
export default DomainContext;
|
||||
Reference in New Issue
Block a user