Fix jwt-token
This commit is contained in:
@@ -38,8 +38,8 @@ const Detections = () => {
|
|||||||
const response = await api.get(`/detections?${params}`);
|
const response = await api.get(`/detections?${params}`);
|
||||||
console.log('✅ Detections response:', response.data);
|
console.log('✅ Detections response:', response.data);
|
||||||
|
|
||||||
setDetections(response.data.detections || []);
|
setDetections(response.data.data?.detections || []);
|
||||||
setPagination(response.data.pagination || {});
|
setPagination(response.data.data?.pagination || {});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('❌ Error fetching detections:', error);
|
console.error('❌ Error fetching detections:', error);
|
||||||
setDetections([]); // Ensure detections is always an array
|
setDetections([]); // Ensure detections is always an array
|
||||||
|
|||||||
Reference in New Issue
Block a user