Small tweak
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
import { COOKIE_VALUES } from "@/data/general"
|
||||
import Cookies from "js-cookie"
|
||||
import { useRouter } from "next/navigation"
|
||||
import { toast } from "sonner"
|
||||
import { Button } from "./ui/button"
|
||||
|
||||
export default function ClearCookiesButton() {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<Button
|
||||
onClick={() => {
|
||||
@@ -22,6 +24,7 @@ export default function ClearCookiesButton() {
|
||||
if (existing === 0) {
|
||||
toast.success("No cookies to clear")
|
||||
} else {
|
||||
router.refresh()
|
||||
toast.success("Cleared " + existing + " cookies")
|
||||
}
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user