From 2c3c45991d260509bb764a732da63caab0a110fd Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Tue, 7 Feb 2023 17:04:19 -0600 Subject: [PATCH] fix installed toast --- src/components/reload-prompt.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/reload-prompt.tsx b/src/components/reload-prompt.tsx index e97245c45..864ea1136 100644 --- a/src/components/reload-prompt.tsx +++ b/src/components/reload-prompt.tsx @@ -12,12 +12,14 @@ export const ReloadPrompt = () => { } = useRegisterSW({ onRegistered(r) { console.log("SW Registered: " + r); - toast({ variant: "success", title: "Installed" }); if (r) { setInterval(() => r.update(), intervalMS); } }, + onOfflineReady() { + toast({ status: "success", title: "App Installed", duration: 2000, isClosable: true }); + }, onRegisterError(error) { console.log("SW registration error", error); },