Skip to content

Commit

Permalink
fix: pet friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
fagundesjg committed May 8, 2024
1 parent ee8c0b7 commit a25af06
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/components/CardAboutShelter/CardAboutShelter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ const CardAboutShelter = (props: ICardAboutShelter) => {
const { shelter } = props;

const check = (v?: string | number | boolean | null) => {
return (
(v !== undefined && v !== null) ||
(typeof v === 'number' && v === 0) ||
(typeof v === 'boolean' && v)
);
return v !== undefined && v !== null;
};

return (
Expand Down Expand Up @@ -49,8 +45,10 @@ const CardAboutShelter = (props: ICardAboutShelter) => {
icon={<PawPrint />}
label={
check(shelter.petFriendly)
? 'O abrigo aceita animais'
: 'O abrigo não aceita animais'
? shelter.petFriendly
? 'O abrigo aceita animais'
: 'O abrigo não aceita animais'
: 'Não informado se aceita animais'
}
/>
<InfoRow
Expand Down

0 comments on commit a25af06

Please sign in to comment.