소스 검색

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 () => {
     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);
         }
         }
     }
     }