feat: add success and error toast

This commit is contained in:
Hachi-R
2025-01-03 17:36:55 -03:00
parent b68fe300ba
commit ef3bf98903
4 changed files with 12 additions and 4 deletions

View File

@@ -149,8 +149,11 @@ export function GameOptionsModal({
setIsDeletingAchievements(true);
try {
await window.electron.resetGameAchievements(game.id);
} finally {
await updateGame();
showSuccessToast(t("reset_achievements_success"));
} catch (error) {
showErrorToast(t("reset_achievements_error"));
} finally {
setIsDeletingAchievements(false);
}
};