Fix jwt-token

This commit is contained in:
2025-09-18 06:43:30 +02:00
parent f7db9b7a37
commit 7626df36b6

View File

@@ -38,8 +38,8 @@ const Detections = () => {
const response = await api.get(`/detections?${params}`);
console.log('✅ Detections response:', response.data);
setDetections(response.data.detections || []);
setPagination(response.data.pagination || {});
setDetections(response.data.data?.detections || []);
setPagination(response.data.data?.pagination || {});
} catch (error) {
console.error('❌ Error fetching detections:', error);
setDetections([]); // Ensure detections is always an array