Преглед на файлове

remove alert when editing a grouped landmark

aidan преди 1 година
родител
ревизия
8e30fe867f
променени са 1 файла, в които са добавени 2 реда и са изтрити 14 реда
  1. 2 14
      src/components/Map/Panels/LandmarkDetailsPanel/LandmarkDetails.tsx

+ 2 - 14
src/components/Map/Panels/LandmarkDetailsPanel/LandmarkDetails.tsx

@@ -226,20 +226,8 @@ const LandmarkDetails: React.FC<LandmarkDetailsProps> = ({markerWindowPosition,
      */
     const editLandmark = async () => {
         if (updatedLandmark) {
-            if (updatedLandmark?.landmark_type == 30) {
-                Alert.alert(
-                    'Are you sure?', 
-                    "This will convert the landmark to an empty group and is irreversible.", 
-                    [
-                        {text: 'Cancel', onPress: () => {return}},
-                        {text: "Okay", onPress: async () => {await editLandmarkMutation.mutateAsync(updatedLandmark); setEditing(false);}},
-                    ]
-                ) 
-            }
-            else {
-                await editLandmarkMutation.mutateAsync(updatedLandmark)
-                setEditing(false);
-            }
+            await editLandmarkMutation.mutateAsync(updatedLandmark)
+            setEditing(false);
         }
     }