From 950fef4b2fe87503de074dd5dbd8a64978129916 Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Sat, 12 Apr 2025 00:49:17 +0000 Subject: [PATCH] Refactor: Update customer context usage in DNS history page 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/11971ec2-3615-47ae-8f09-4df9209737a3.jpg --- client/src/pages/history.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/pages/history.tsx b/client/src/pages/history.tsx index 4ccccf5..fe951a6 100644 --- a/client/src/pages/history.tsx +++ b/client/src/pages/history.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import { useQuery } from "@tanstack/react-query"; import { MainLayout } from "@/components/layouts/main-layout"; import { DnsHistory, Domain } from "@shared/schema"; -import { useOrganization } from "@/context/organization-context"; +import { useCustomer } from "@/context/customer-context"; import { formatDistanceToNow, format } from "date-fns"; import { Card, @@ -31,15 +31,15 @@ import { Badge } from "@/components/ui/badge"; import { Loader2, Plus, Pencil, Trash, AlertCircle } from "lucide-react"; export default function HistoryPage() { - const { currentOrganization } = useOrganization(); + const { currentCustomer } = useCustomer(); const [selectedDomain, setSelectedDomain] = useState("all"); const [currentPage, setCurrentPage] = useState(1); const pageSize = 10; // Fetch domains for filter const { data: domains = [] } = useQuery({ - queryKey: ["/api/domains", currentOrganization?.id], - enabled: !!currentOrganization?.id, + queryKey: ["/api/domains", currentCustomer?.id], + enabled: !!currentCustomer?.id, }); // Fetch DNS history