mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-07-26 11:38:13 +00:00
Fix: Update domain table 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/0e2836d4-c97b-41c9-8f81-6560047aa585.jpg
This commit is contained in:
@@ -2,7 +2,7 @@ import { useState } from "react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { Domain, Provider } from "@shared/schema";
|
||||
import { Link } from "wouter";
|
||||
import { useOrganization } from "@/context/organization-context";
|
||||
import { useCustomer } from "@/context/customer-context";
|
||||
import { Pagination } from "@/components/shared/pagination";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
@@ -29,13 +29,13 @@ interface DomainTableProps {
|
||||
}
|
||||
|
||||
export function DomainTable({ onManageDomain, onDeleteDomain, onAddDomain }: DomainTableProps) {
|
||||
const { currentOrganization } = useOrganization();
|
||||
const { currentCustomer } = useCustomer();
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const pageSize = 5;
|
||||
|
||||
const { data: domains = [], isLoading } = useQuery<Domain[]>({
|
||||
queryKey: ["/api/domains", currentOrganization?.id],
|
||||
enabled: !!currentOrganization,
|
||||
queryKey: ["/api/domains", currentCustomer?.id],
|
||||
enabled: !!currentCustomer,
|
||||
});
|
||||
|
||||
// Get providers to display provider names
|
||||
|
||||
Reference in New Issue
Block a user