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
This commit is contained in:
marco370 2025-11-24 10:56:44 +00:00
parent 2067c390c1
commit edf7ef97f0
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ export default function Dashboard() {
}); });
const { data: recentDetections } = useQuery<Detection[]>({ const { data: recentDetections } = useQuery<Detection[]>({
queryKey: ["/api/detections"], queryKey: ["/api/detections?limit=100"],
refetchInterval: 5000, // Refresh every 5s refetchInterval: 5000, // Refresh every 5s
}); });

View File

@ -12,7 +12,7 @@ import { getFlag } from "@/lib/country-flags";
export default function Detections() { export default function Detections() {
const [searchQuery, setSearchQuery] = useState(""); const [searchQuery, setSearchQuery] = useState("");
const { data: detections, isLoading } = useQuery<Detection[]>({ const { data: detections, isLoading } = useQuery<Detection[]>({
queryKey: ["/api/detections"], queryKey: ["/api/detections?limit=100"],
refetchInterval: 5000, refetchInterval: 5000,
}); });