fix installed toast

This commit is contained in:
hzrd149 2023-02-07 17:04:19 -06:00
parent 395edf5556
commit 2c3c45991d

View File

@ -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);
},