ui and layout fix

This commit is contained in:
Pallavi Kumari
2025-10-20 01:39:39 +05:30
parent edf64ae7b5
commit 2b05bc1f5f
11 changed files with 159 additions and 154 deletions

View File

@@ -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;