aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/preview/ActionBar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/components/dashboard/preview/ActionBar.tsx')
-rw-r--r--apps/web/components/dashboard/preview/ActionBar.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/web/components/dashboard/preview/ActionBar.tsx b/apps/web/components/dashboard/preview/ActionBar.tsx
index ec659e35..3505d0a5 100644
--- a/apps/web/components/dashboard/preview/ActionBar.tsx
+++ b/apps/web/components/dashboard/preview/ActionBar.tsx
@@ -1,3 +1,4 @@
+import { useRouter } from "next/navigation";
import { ActionButton } from "@/components/ui/action-button";
import {
Tooltip,
@@ -16,6 +17,7 @@ import {
import { ArchivedActionIcon, FavouritedActionIcon } from "../bookmarks/icons";
export default function ActionBar({ bookmark }: { bookmark: ZBookmark }) {
+ const router = useRouter();
const onError = () => {
toast({
variant: "destructive",
@@ -46,6 +48,7 @@ export default function ActionBar({ bookmark }: { bookmark: ZBookmark }) {
toast({
description: "The bookmark has been deleted!",
});
+ router.back();
},
onError,
});