mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-04 15:27:44 +00:00
Update domain management to use customer context instead of organization context.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/fd7e7757-5e83-47ac-86cf-1e24c81d55bb.jpg
This commit is contained in:
@@ -4,7 +4,7 @@ import { MainLayout } from "@/components/layouts/main-layout";
|
||||
import { DomainTable } from "@/components/domain/domain-table";
|
||||
import { DomainDetails } from "@/components/domain/domain-details";
|
||||
import { Domain, InsertDomain, Provider } from "@shared/schema";
|
||||
import { useOrganization } from "@/context/organization-context";
|
||||
import { useCustomer } from "@/context/customer-context";
|
||||
import { apiRequest, queryClient } from "@/lib/queryClient";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { useForm } from "react-hook-form";
|
||||
@@ -61,7 +61,7 @@ const domainFormSchema = z.object({
|
||||
|
||||
export default function DomainsPage() {
|
||||
const { toast } = useToast();
|
||||
const { currentOrganization } = useOrganization();
|
||||
const { currentCustomer } = useCustomer();
|
||||
|
||||
const [isAddDomainDialogOpen, setIsAddDomainDialogOpen] = useState(false);
|
||||
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);
|
||||
@@ -70,8 +70,8 @@ export default function DomainsPage() {
|
||||
|
||||
// Fetch domains
|
||||
const { data: domains = [], isLoading } = useQuery<Domain[]>({
|
||||
queryKey: ["/api/domains", currentOrganization?.id],
|
||||
enabled: !!currentOrganization?.id,
|
||||
queryKey: ["/api/domains", currentCustomer?.id],
|
||||
enabled: !!currentCustomer?.id,
|
||||
});
|
||||
|
||||
// Fetch providers for the form
|
||||
|
||||
Reference in New Issue
Block a user