Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/xai-foundation/sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbartnik committed Dec 7, 2023
2 parents dd5c010 + a5e5bb7 commit e797d21
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions apps/sentry-client-desktop/src/features/router/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@ const store = createStore();

export function AppRoutes() {
const queryClient = new QueryClient();
const [toastId, setToastId] = useState("");
const [loadingToastId, setLoadingToastId] = useState("");

window.ipcRenderer.on("update-available", () => {
setToastId(toast.loading("Downloading update. Your app will restart soon."));
setLoadingToastId(toast.loading("Downloading update. Your app will restart soon."));
});

window.ipcRenderer.on("update-error", () => {
if (toastId) {
toast.dismiss(toastId);
setToastId("");
if (loadingToastId) {
toast.dismiss(loadingToastId);
setLoadingToastId("");
}

toast.remove();
toast.error("Error downloading update. Retrying in 5 minutes.");
});

Expand Down

0 comments on commit e797d21

Please sign in to comment.