diff --git a/client/src/pages/metrics.tsx b/client/src/pages/metrics.tsx index 18c6e8c..2b73356 100644 --- a/client/src/pages/metrics.tsx +++ b/client/src/pages/metrics.tsx @@ -5,7 +5,7 @@ import { DnsUpdateChart } from "@/components/charts/dns-update-chart"; import { ProviderDistributionChart } from "@/components/charts/provider-distribution-chart"; import { RecordTypeChart } from "@/components/charts/record-type-chart"; import { Domain, DnsMetric } from "@shared/schema"; -import { useOrganization } from "@/context/organization-context"; +import { useCustomer } from "@/context/customer-context"; import { Card, CardContent, @@ -29,14 +29,14 @@ import { import { BarChart, LineChart, PieChart, Home, BarChart2, Activity, Clock } from "lucide-react"; export default function MetricsPage() { - const { currentOrganization } = useOrganization(); + const { currentCustomer } = useCustomer(); const [selectedTimeframe, setSelectedTimeframe] = useState("day"); const [selectedDomain, setSelectedDomain] = useState("all"); // Fetch domains for filter const { data: domains = [] } = useQuery({ - queryKey: ["/api/domains", currentOrganization?.id], - enabled: !!currentOrganization?.id, + queryKey: ["/api/domains", currentCustomer?.id], + enabled: !!currentCustomer?.id, }); // Calculate date range for metrics queries diff --git a/client/src/pages/settings.tsx b/client/src/pages/settings.tsx index 2385db2..af40c67 100644 --- a/client/src/pages/settings.tsx +++ b/client/src/pages/settings.tsx @@ -1,9 +1,9 @@ import { useState } from "react"; import { useQuery, useMutation } from "@tanstack/react-query"; import { MainLayout } from "@/components/layouts/main-layout"; -import { Organization, InsertOrganization } from "@shared/schema"; +import { Customer, InsertCustomer } from "@shared/schema"; import { useAuth } from "@/hooks/use-auth"; -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 { useTheme } from "@/hooks/use-theme"; @@ -88,7 +88,7 @@ export default function SettingsPage() { const { toast } = useToast(); const { user } = useAuth(); const { theme, setTheme } = useTheme(); - const { currentOrganization, setCurrentOrganization, createOrganizationMutation } = useOrganization(); + const { currentCustomer, setCurrentCustomer, createCustomerMutation } = useCustomer(); const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);