From 41e093312a99125de2342ae31ed3c7f106950bdb Mon Sep 17 00:00:00 2001 From: sylenien Date: Tue, 28 Jun 2022 13:29:07 +0200 Subject: [PATCH] fix(ui): fix bookmarking --- frontend/app/components/shared/Bookmark/Bookmark.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/shared/Bookmark/Bookmark.tsx b/frontend/app/components/shared/Bookmark/Bookmark.tsx index a96e7fb5f..ff615540a 100644 --- a/frontend/app/components/shared/Bookmark/Bookmark.tsx +++ b/frontend/app/components/shared/Bookmark/Bookmark.tsx @@ -24,7 +24,6 @@ function Bookmark(props : Props ) { const ACTIVE_ICON = isEnterprise ? 'safe-fill' : 'star-solid'; const INACTIVE_ICON = isEnterprise ? 'safe' : 'star'; - useEffect(() => { setIsFavorite(favorite); }, [favorite]); @@ -63,4 +62,5 @@ function Bookmark(props : Props ) { export default connect(state => ({ isEnterprise: state.getIn([ 'user', 'account', 'edition' ]) === 'ee', + favorite: state.getIn([ 'sessions', 'current', 'favorite']), }), { toggleFavorite })(Bookmark)