Skip to content

Commit

Permalink
fix: alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
YoanRos committed Aug 2, 2024
1 parent e31fd97 commit 94938c0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions expo/src/scenes/Infos/Transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,16 @@ const Transfer = ({ navigation }) => {
const matomoId = storage.getString("@UserIdv2");
await API.put({ path: `/user`, body: { matomoId, pushNotifToken } }).then((res) => {
if (res.ok) {
Alert.alert("Félicitations, vos données ont bien été importées 🥳");
logEvent({ category: "TRANSFER", action: "IMPORT_DATA_SUCCESS" });
Expo.reloadAppAsync();
} else {
Alert.alert("Félicitations, vos données ont bien été importées 🥳");
logEvent({ category: "TRANSFER", action: "IMPORT_DATA_SUCCESS", name: "PUSH_NOTIF_TOKEN_NOT_SYNC" });
Expo.reloadAppAsync();
}
Alert.alert("Félicitations, vos données ont bien été importées 🥳");
Expo.reloadAppAsync();
});
} catch (error) {
Alert.alert("Une erreur est survenue lors de l'importation des données: " + error.message);
logEvent({ category: "TRANSFER", action: "IMPORT_DATA_FAILURE", label: error.message });
Alert.alert("Une erreur est survenue lors de l'importation des données");
logEvent({ category: "TRANSFER", action: "IMPORT_DATA_FAILURE" });
}
};

Expand Down

0 comments on commit 94938c0

Please sign in to comment.