aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/components/dashboard/bookmarks')
-rw-r--r--apps/web/components/dashboard/bookmarks/AddToListModal.tsx5
-rw-r--r--apps/web/components/dashboard/bookmarks/TagsEditor.tsx1
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/web/components/dashboard/bookmarks/AddToListModal.tsx b/apps/web/components/dashboard/bookmarks/AddToListModal.tsx
index 6242aa27..b8cce66d 100644
--- a/apps/web/components/dashboard/bookmarks/AddToListModal.tsx
+++ b/apps/web/components/dashboard/bookmarks/AddToListModal.tsx
@@ -52,7 +52,6 @@ export default function AddToListModal({
const { data: lists, isPending: isFetchingListsPending } =
api.lists.list.useQuery();
- const listInvalidationFunction = api.useUtils().lists.get.invalidate;
const bookmarksInvalidationFunction =
api.useUtils().bookmarks.getBookmarks.invalidate;
@@ -62,8 +61,8 @@ export default function AddToListModal({
toast({
description: "List has been updated!",
});
- listInvalidationFunction({ listId: req.listId });
- bookmarksInvalidationFunction();
+ setOpen(false);
+ bookmarksInvalidationFunction({ listId: req.listId });
},
onError: (e) => {
if (e.data?.code == "BAD_REQUEST") {
diff --git a/apps/web/components/dashboard/bookmarks/TagsEditor.tsx b/apps/web/components/dashboard/bookmarks/TagsEditor.tsx
index 8bfbce19..12c0dcd0 100644
--- a/apps/web/components/dashboard/bookmarks/TagsEditor.tsx
+++ b/apps/web/components/dashboard/bookmarks/TagsEditor.tsx
@@ -75,6 +75,7 @@ export function TagsEditor({ bookmark }: { bookmark: ZBookmark }) {
description: "Tags has been updated!",
});
bookmarkInvalidationFunction({ bookmarkId: bookmark.id });
+ // TODO(bug) Invalidate the tag views as well
},
onError: () => {
toast({