From 3755661ff6ccda5ce03db6b7e52af2a2c61b1fc5 Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Tue, 20 Jun 2023 19:14:15 +0800 Subject: [PATCH] fix: incorrect bookmark toast text (#2815) Co-authored-by: Alex Yang --- .../components/blocksuite/block-suite-page-list/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/blocksuite/block-suite-page-list/index.tsx b/apps/web/src/components/blocksuite/block-suite-page-list/index.tsx index 3f673d56e9..2479fffb5d 100644 --- a/apps/web/src/components/blocksuite/block-suite-page-list/index.tsx +++ b/apps/web/src/components/blocksuite/block-suite-page-list/index.tsx @@ -209,11 +209,10 @@ export const BlockSuitePageList: React.FC = ({ toast(t['restored']({ title: pageMeta.title || 'Untitled' })); }, bookmarkPage: () => { + const status = pageMeta.favorite; toggleFavorite(pageMeta.id); toast( - pageMeta.favorite - ? t['Removed from Favorites']() - : t['Added to Favorites']() + status ? t['Removed from Favorites']() : t['Added to Favorites']() ); }, onDisablePublicSharing: () => {