Fix jwt-token
This commit is contained in:
@@ -26,9 +26,10 @@ export const EditAlertModal = ({ rule, onClose, onSuccess }) => {
|
|||||||
const fetchDroneTypes = async () => {
|
const fetchDroneTypes = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await api.get('/drone-types');
|
const response = await api.get('/drone-types');
|
||||||
setDroneTypes(response.data);
|
setDroneTypes(response.data.data || []);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching drone types:', error);
|
console.error('Error fetching drone types:', error);
|
||||||
|
setDroneTypes([]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user