From 54a1d819366deca2b4865f9560261128aaa1f809 Mon Sep 17 00:00:00 2001 From: RetroSunstar <57507616+RetroSunstar@users.noreply.github.com> Date: Thu, 16 Jul 2026 16:33:49 +0100 Subject: [PATCH] Remove success toast from Bookmark Button (#11054) Co-authored-by: Eric Bailey --- oxlint-suppressions.json | 2 +- .../PostControls/BookmarkButton.tsx | 33 +++---------------- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/oxlint-suppressions.json b/oxlint-suppressions.json index f846bb0561..bf1ed59cf4 100644 --- a/oxlint-suppressions.json +++ b/oxlint-suppressions.json @@ -282,7 +282,7 @@ "count": 2 }, "typescript/no-misused-promises": { - "count": 2 + "count": 1 } }, "src/components/PostControls/DiscoverDebug.tsx": { diff --git a/src/components/PostControls/BookmarkButton.tsx b/src/components/PostControls/BookmarkButton.tsx index ba6ad18ff8..b2ed043365 100644 --- a/src/components/PostControls/BookmarkButton.tsx +++ b/src/components/PostControls/BookmarkButton.tsx @@ -46,7 +46,7 @@ export const BookmarkButton = memo(function BookmarkButton({ }), ) - const save = async ({disableUndo}: {disableUndo?: boolean} = {}) => { + const save = async () => { try { await bookmark({ action: 'create', @@ -59,25 +59,6 @@ export const BookmarkButton = memo(function BookmarkButton({ logContext, feedDescriptor, }) - - toast.show( - - - - Post saved - - {!disableUndo && ( - remove({disableUndo: true})}> - {undoLabel} - - )} - , - { - type: 'success', - }, - ) } catch (e: any) { const {raw, clean} = cleanError(e) toast.show(clean || raw || e, { @@ -86,7 +67,7 @@ export const BookmarkButton = memo(function BookmarkButton({ } } - const remove = async ({disableUndo}: {disableUndo?: boolean} = {}) => { + const remove = async () => { try { await bookmark({ action: 'delete', @@ -106,13 +87,9 @@ export const BookmarkButton = memo(function BookmarkButton({ Removed from saved posts - {!disableUndo && ( - save({disableUndo: true})}> - {undoLabel} - - )} + save()}> + {undoLabel} + , ) } catch (e: any) {