Skip to content

Commit a25af06

Browse files
committed
fix: pet friendly
1 parent ee8c0b7 commit a25af06

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/components/CardAboutShelter/CardAboutShelter.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ const CardAboutShelter = (props: ICardAboutShelter) => {
1515
const { shelter } = props;
1616

1717
const check = (v?: string | number | boolean | null) => {
18-
return (
19-
(v !== undefined && v !== null) ||
20-
(typeof v === 'number' && v === 0) ||
21-
(typeof v === 'boolean' && v)
22-
);
18+
return v !== undefined && v !== null;
2319
};
2420

2521
return (
@@ -49,8 +45,10 @@ const CardAboutShelter = (props: ICardAboutShelter) => {
4945
icon={<PawPrint />}
5046
label={
5147
check(shelter.petFriendly)
52-
? 'O abrigo aceita animais'
53-
: 'O abrigo não aceita animais'
48+
? shelter.petFriendly
49+
? 'O abrigo aceita animais'
50+
: 'O abrigo não aceita animais'
51+
: 'Não informado se aceita animais'
5452
}
5553
/>
5654
<InfoRow

0 commit comments

Comments
 (0)