From f67ae821230da9bc92a3c9ff6c550a36d48c0ee9 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 28 Feb 2024 15:43:32 +0000 Subject: tests: Add tests for the bookmarks routes --- packages/web/app/dashboard/bookmarks/components/LinkCard.tsx | 2 +- packages/web/app/dashboard/bookmarks/components/TagModal.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/web/app/dashboard/bookmarks/components') diff --git a/packages/web/app/dashboard/bookmarks/components/LinkCard.tsx b/packages/web/app/dashboard/bookmarks/components/LinkCard.tsx index 56e3d243..cd0f128c 100644 --- a/packages/web/app/dashboard/bookmarks/components/LinkCard.tsx +++ b/packages/web/app/dashboard/bookmarks/components/LinkCard.tsx @@ -60,7 +60,7 @@ export default function LinkCard({ }) { const { data: bookmark } = api.bookmarks.getBookmark.useQuery( { - id: initialData.id, + bookmarkId: initialData.id, }, { initialData, diff --git a/packages/web/app/dashboard/bookmarks/components/TagModal.tsx b/packages/web/app/dashboard/bookmarks/components/TagModal.tsx index c1618541..b0e391b7 100644 --- a/packages/web/app/dashboard/bookmarks/components/TagModal.tsx +++ b/packages/web/app/dashboard/bookmarks/components/TagModal.tsx @@ -130,7 +130,7 @@ export default function TagModal({ toast({ description: "Tags has been updated!", }); - bookmarkInvalidationFunction({ id: bookmark.id }); + bookmarkInvalidationFunction({ bookmarkId: bookmark.id }); }, onError: () => { toast({ @@ -153,7 +153,7 @@ export default function TagModal({ } for (const t of bookmark.tags) { if (!tags.has(t.name)) { - detach.push(t.id); + detach.push({ tagId: t.id }); } } mutate({ -- cgit v1.2.3-70-g09d2