From 0b769c3532551e9d0e7077703e4ea861a1179c66 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Tue, 8 Apr 2025 03:56:19 -0700 Subject: fix: Deprecate the updateBookmarkText trpc endpoint and replace it with updateBookmark --- apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx | 4 ++-- apps/web/components/dashboard/bookmarks/BookmarkMarkdownComponent.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'apps') diff --git a/apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx b/apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx index 98158ab1..e89d572d 100644 --- a/apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx +++ b/apps/mobile/app/dashboard/bookmarks/[slug]/index.tsx @@ -25,7 +25,7 @@ import { ClipboardList, Globe, Info, Tag, Trash2 } from "lucide-react-native"; import { useDeleteBookmark, - useUpdateBookmarkText, + useUpdateBookmark, } from "@hoarder/shared-react/hooks/bookmarks"; import { BookmarkTypes, ZBookmark } from "@hoarder/shared/types/bookmarks"; @@ -174,7 +174,7 @@ function BookmarkTextView({ bookmark }: { bookmark: ZBookmark }) { const initialText = bookmark.content.text; const [content, setContent] = useState(initialText); - const { mutate, isPending } = useUpdateBookmarkText({ + const { mutate, isPending } = useUpdateBookmark({ onError: () => { toast({ message: "Something went wrong", diff --git a/apps/web/components/dashboard/bookmarks/BookmarkMarkdownComponent.tsx b/apps/web/components/dashboard/bookmarks/BookmarkMarkdownComponent.tsx index 60a6d634..9f7f2138 100644 --- a/apps/web/components/dashboard/bookmarks/BookmarkMarkdownComponent.tsx +++ b/apps/web/components/dashboard/bookmarks/BookmarkMarkdownComponent.tsx @@ -3,7 +3,7 @@ import { MarkdownReadonly } from "@/components/ui/markdown/markdown-readonly"; import { toast } from "@/components/ui/use-toast"; import type { ZBookmarkTypeText } from "@hoarder/shared/types/bookmarks"; -import { useUpdateBookmarkText } from "@hoarder/shared-react/hooks/bookmarks"; +import { useUpdateBookmark } from "@hoarder/shared-react/hooks/bookmarks"; export function BookmarkMarkdownComponent({ children: bookmark, @@ -12,7 +12,7 @@ export function BookmarkMarkdownComponent({ children: ZBookmarkTypeText; readOnly?: boolean; }) { - const { mutate: updateBookmarkMutator, isPending } = useUpdateBookmarkText({ + const { mutate: updateBookmarkMutator, isPending } = useUpdateBookmark({ onSuccess: () => { toast({ description: "Note updated!", -- cgit v1.2.3-70-g09d2