From d7eee00bd64857f2241352f0867803977376c1db Mon Sep 17 00:00:00 2001 From: lucieo Date: Tue, 27 Feb 2024 16:36:37 +0100 Subject: [PATCH] Fix space creation bug --- .../documentation/1.0.0/full_documentation.json | 2 +- web/components/Account/Place/PlaceTabList.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/back/extensions/documentation/documentation/1.0.0/full_documentation.json b/back/extensions/documentation/documentation/1.0.0/full_documentation.json index 526c714..dfae662 100644 --- a/back/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/back/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "02/27/2024 8:27:40 AM" + "x-generation-date": "02/27/2024 4:32:17 PM" }, "x-strapi-config": { "path": "/documentation", diff --git a/web/components/Account/Place/PlaceTabList.tsx b/web/components/Account/Place/PlaceTabList.tsx index 24bf53e..5e6d572 100644 --- a/web/components/Account/Place/PlaceTabList.tsx +++ b/web/components/Account/Place/PlaceTabList.tsx @@ -43,14 +43,14 @@ const PlaceTabList = ({ const { t } = useTranslation('place') const nbAvailable = useMemo(() => { - if (!place || !place.disponibilities) return 0 - return place.disponibilities.filter( + if (!place || !place?.disponibilities) return 0 + return place?.disponibilities.filter( (dispo) => dispo.status === DisponibilityStatus.AVAILABLE && !dispo.campaign, ).length }, [place?.disponibilities]) - const { campaignDisposNum } = useCampaignDispo(place.disponibilities) + const { campaignDisposNum } = useCampaignDispo(place?.disponibilities) return (