Skip to content

Commit

Permalink
Update update-prompt.tsx
Browse files Browse the repository at this point in the history
disable update prompt

Signed-off-by: Nedim Arabacı <nedimarabaci@gmail.com>
  • Loading branch information
needim authored Jan 6, 2025
1 parent 14a7805 commit 46f230e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/update-prompt.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRegisterSW } from "virtual:pwa-register/react";
import { ToastAction, ToastClose } from "@/components/ui/toast";
import { useToast } from "@/components/ui/use-toast";
//import { ToastAction, ToastClose } from "@/components/ui/toast";
//import { useToast } from "@/components/ui/use-toast";
import { useEffect } from "react";

const PERIOD = 30 * 1000; // 30 seconds
Expand All @@ -22,15 +22,15 @@ function UpdatePrompt() {
},
});

const { toast } = useToast();
//const { toast } = useToast();

const close = () => setNeedRefresh(false);
const update = () => updateServiceWorker(true);

// biome-ignore lint/correctness/useExhaustiveDependencies: we don't need to add toast to the dependencies
useEffect(() => {
if (needRefresh) {
toast({
/*toast({
title: "New version 🎉",
description: "Reload to update the app.",
type: "background",
Expand All @@ -49,7 +49,7 @@ function UpdatePrompt() {
<ToastClose onClick={() => close()}>Dismiss</ToastClose>
</>
),
});
});*/
}
}, [needRefresh]);

Expand Down

0 comments on commit 46f230e

Please sign in to comment.