fix: handle undefined values for number of bathrooms and parking spots in CardInfos
This commit is contained in:
parent
e499923fcb
commit
f9cacce912
1 changed files with 2 additions and 2 deletions
|
|
@ -487,7 +487,7 @@ const CardInfos = ({ data }: { data: Annunci }) => {
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-center gap-2 rounded-md bg-primary-foreground p-2 text-primary">
|
<div className="flex justify-center gap-2 rounded-md bg-primary-foreground p-2 text-primary">
|
||||||
<Bath />
|
<Bath />
|
||||||
<span>{data.numero_bagni} bagni</span>
|
<span>{data.numero_bagni || 0} bagni</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-center gap-2 rounded-md bg-primary-foreground p-2 text-primary">
|
<div className="flex justify-center gap-2 rounded-md bg-primary-foreground p-2 text-primary">
|
||||||
<Armchair />
|
<Armchair />
|
||||||
|
|
@ -495,7 +495,7 @@ const CardInfos = ({ data }: { data: Annunci }) => {
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-center gap-2 rounded-md bg-primary-foreground p-2 text-primary">
|
<div className="flex justify-center gap-2 rounded-md bg-primary-foreground p-2 text-primary">
|
||||||
<Car />
|
<Car />
|
||||||
<span>{data.numero_postiauto} posti auto</span>
|
<span>{data.numero_postiauto || 0} posti auto</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue