|
@@ -180,6 +180,8 @@ const LandmarkDetails: React.FC<LandmarkDetailsProps> = ({authNavigation, landma
|
|
|
if (deleteLandmarkMutation.isSuccess) {
|
|
|
deleteLandmarkMutation.reset()
|
|
|
}
|
|
|
+
|
|
|
+ console.log(deleteLandmarkMutation.status)
|
|
|
}
|
|
|
resetDeleteLMOnSuccess();
|
|
|
}, [deleteLandmarkMutation.status]);
|
|
@@ -236,14 +238,14 @@ const LandmarkDetails: React.FC<LandmarkDetailsProps> = ({authNavigation, landma
|
|
|
* Calls the {@linkcode deleteLandmark} mutation from the {@link useLandmarks} hook and closes the modal once finished.
|
|
|
*/
|
|
|
const removeLandmark = async () => {
|
|
|
- Alert.alert("Are you sure you want to delete landmark here?", undefined,
|
|
|
+ Alert.alert("Are you sure you want to delete this landmark?", undefined,
|
|
|
[{ text: "Cancel", }
|
|
|
,
|
|
|
{
|
|
|
text: "Confirm", onPress: async () => {
|
|
|
await deleteLandmarkMutation.mutateAsync(landmarkId);
|
|
|
toggleDetailsPanel(false);
|
|
|
- Alert.alert("LANDMARK HAS BEEN DELETED")
|
|
|
+ Alert.alert("Landmark Deleted", "This landmark has been deleted.");
|
|
|
}
|
|
|
}])
|
|
|
}
|
|
@@ -370,8 +372,8 @@ const LandmarkDetails: React.FC<LandmarkDetailsProps> = ({authNavigation, landma
|
|
|
</View>
|
|
|
:
|
|
|
(landmarkQuery.isSuccess || landmarkQuery.isIdle) &&
|
|
|
- editLandmarkMutation.isIdle || editLandmarkMutation.isSuccess &&
|
|
|
- deleteLandmarkMutation.isIdle || deleteLandmarkMutation.isSuccess ?
|
|
|
+ (editLandmarkMutation.isIdle || editLandmarkMutation.isSuccess) &&
|
|
|
+ (deleteLandmarkMutation.isIdle || deleteLandmarkMutation.isSuccess) ?
|
|
|
<>
|
|
|
<DetailsHeader
|
|
|
authNavigation={authNavigation}
|