From 4b58ca802baf168bbe707e89ea80e9e5a249e4c9 Mon Sep 17 00:00:00 2001 From: lucieo Date: Mon, 4 Mar 2024 10:05:32 +0100 Subject: [PATCH] Show switch only to both campaign and solidarity places detail page --- .../Campaign/Places/Detail/CampaignPlaceDetail.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/web/components/Campaign/Places/Detail/CampaignPlaceDetail.tsx b/web/components/Campaign/Places/Detail/CampaignPlaceDetail.tsx index 03b9a34..739cec8 100644 --- a/web/components/Campaign/Places/Detail/CampaignPlaceDetail.tsx +++ b/web/components/Campaign/Places/Detail/CampaignPlaceDetail.tsx @@ -40,9 +40,11 @@ const CampaignPlaceDetail = ({ place }: Props) => { ) }, [place]) - const { campaignDispos, solidarityDisposNum } = useCampaignDispo( - place?.disponibilities, - ) + const { + campaignDispos, + solidarityDisposNum, + campaignDisposNum, + } = useCampaignDispo(place?.disponibilities) return ( @@ -81,7 +83,9 @@ const CampaignPlaceDetail = ({ place }: Props) => { )} - + {Boolean(solidarityDisposNum && campaignDispos) && ( + + )} {isMobile && (