Browse Source

remove alert when editing a grouped landmark

aidan 1 year ago
parent
commit
8e30fe867f
1 changed files with 2 additions and 14 deletions
  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 () => {
     const editLandmark = async () => {
         if (updatedLandmark) {
         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);
         }
         }
     }
     }