Fix jwt-token
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user