From edf7ef97f0d361f5ec150e9e3275d0bd6a416f76 Mon Sep 17 00:00:00 2001 From: marco370 <48531002-marco370@users.noreply.replit.com> Date: Mon, 24 Nov 2025 10:56:44 +0000 Subject: [PATCH] Improve dashboard and detection loading performance Add ?limit=100 to API calls in Dashboard and Detections components to optimize data fetching. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528 Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: aaffd902-9ebc-479f-a635-1a5480cf366e Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/x5P9dcJ --- client/src/pages/Dashboard.tsx | 2 +- client/src/pages/Detections.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/pages/Dashboard.tsx b/client/src/pages/Dashboard.tsx index c5f15ee..899d48b 100644 --- a/client/src/pages/Dashboard.tsx +++ b/client/src/pages/Dashboard.tsx @@ -37,7 +37,7 @@ export default function Dashboard() { }); const { data: recentDetections } = useQuery({ - queryKey: ["/api/detections"], + queryKey: ["/api/detections?limit=100"], refetchInterval: 5000, // Refresh every 5s }); diff --git a/client/src/pages/Detections.tsx b/client/src/pages/Detections.tsx index 2cbe173..4a583c8 100644 --- a/client/src/pages/Detections.tsx +++ b/client/src/pages/Detections.tsx @@ -12,7 +12,7 @@ import { getFlag } from "@/lib/country-flags"; export default function Detections() { const [searchQuery, setSearchQuery] = useState(""); const { data: detections, isLoading } = useQuery({ - queryKey: ["/api/detections"], + queryKey: ["/api/detections?limit=100"], refetchInterval: 5000, });