aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web/app/dashboard/bookmarks/components
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-02-28 15:43:32 +0000
committerMohamedBassem <me@mbassem.com>2024-02-28 15:43:32 +0000
commitf67ae821230da9bc92a3c9ff6c550a36d48c0ee9 (patch)
tree75ff0d4e07bd066d3acc7e7cfa6ef126ea0eebc7 /packages/web/app/dashboard/bookmarks/components
parent0f0e7ca8d134c2cfc02ac62539ad10c811319b38 (diff)
downloadkarakeep-f67ae821230da9bc92a3c9ff6c550a36d48c0ee9.tar.zst
tests: Add tests for the bookmarks routes
Diffstat (limited to 'packages/web/app/dashboard/bookmarks/components')
-rw-r--r--packages/web/app/dashboard/bookmarks/components/LinkCard.tsx2
-rw-r--r--packages/web/app/dashboard/bookmarks/components/TagModal.tsx4
2 files changed, 3 insertions, 3 deletions
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({