From 90d47a8fcabc27f548959fa20de60cd49c38ea45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bosi?= <71827178+bosiraphael@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:20:37 +0100 Subject: [PATCH] Fix favorite button (#9001) Closes #8977 --- .../modules/favorites/components/PageFavoriteButton.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx b/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx index a286b984c5..576de925ad 100644 --- a/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx +++ b/packages/twenty-front/src/modules/favorites/components/PageFavoriteButton.tsx @@ -1,5 +1,5 @@ import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled'; -import { Button, IconButton, IconHeart } from 'twenty-ui'; +import { Button, IconButton, IconHeart, IconHeartOff } from 'twenty-ui'; type PageFavoriteButtonProps = { isFavorite: boolean; @@ -11,18 +11,20 @@ export const PageFavoriteButton = ({ onClick, }: PageFavoriteButtonProps) => { const title = isFavorite ? 'Remove from favorites' : 'Add to favorites'; + const isPageHeaderV2Enabled = useIsFeatureEnabled( 'IS_PAGE_HEADER_V2_ENABLED', ); + return ( <> {isPageHeaderV2Enabled ? (