Skip to content

Commit

Permalink
Fix space creation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucieo committed Feb 27, 2024
1 parent b5eb11d commit d7eee00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions web/components/Account/Place/PlaceTabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<TabList
Expand Down Expand Up @@ -89,7 +89,7 @@ const PlaceTabList = ({
: 'tabs.slot_campaign_applications',
{
title: currentCampaign?.title,
nb: campaignDisposNum,
nb: campaignDisposNum ?? 0,
nbTotal: currentCampaign?.disponibilities_max,
},
)}
Expand Down

0 comments on commit d7eee00

Please sign in to comment.