@@ -13,6 +13,8 @@ import { Card } from '../ui/card';
13
13
import { ICardAboutShelter } from './types' ;
14
14
import { InfoRow } from './components' ;
15
15
import { checkAndFormatAddress } from './utils' ;
16
+ import { ShelterCategory } from '@/hooks/useShelter/types' ;
17
+ import { Fragment } from 'react/jsx-runtime' ;
16
18
17
19
const CardAboutShelter = ( props : ICardAboutShelter ) => {
18
20
const { shelter } = props ;
@@ -33,42 +35,46 @@ const CardAboutShelter = (props: ICardAboutShelter) => {
33
35
{ Boolean ( shelter . zipCode ) && (
34
36
< InfoRow icon = { < MapPinned /> } label = "CEP:" value = { shelter . zipCode } />
35
37
) }
36
- < InfoRow
37
- icon = { < PawPrint /> }
38
- label = {
39
- check ( shelter . petFriendly ) ? (
40
- shelter . petFriendly ? (
41
- < p >
42
- O abrigo < b > aceita</ b > animais
43
- </ p >
44
- ) : (
45
- < p >
46
- O abrigo < b > não</ b > aceita animais
47
- </ p >
48
- )
49
- ) : (
50
- < b > Não informado se aceita animais</ b >
51
- )
52
- }
53
- />
54
- < InfoRow
55
- icon = { < HandHeart /> }
56
- label = "Pessoas abrigadas:"
57
- value = {
58
- check ( shelter . shelteredPeople )
59
- ? `${ shelter . shelteredPeople } pessoas`
60
- : 'Não informado'
61
- }
62
- />
63
- < InfoRow
64
- icon = { < UsersRound /> }
65
- label = "Capacidade do abrigo:"
66
- value = {
67
- check ( shelter . capacity )
68
- ? `${ shelter . capacity } pessoas`
69
- : 'Não informado'
70
- }
71
- />
38
+ { shelter . category === ShelterCategory . Shelter && (
39
+ < Fragment >
40
+ < InfoRow
41
+ icon = { < PawPrint /> }
42
+ label = {
43
+ check ( shelter . petFriendly ) ? (
44
+ shelter . petFriendly ? (
45
+ < p >
46
+ O abrigo < b > aceita</ b > animais
47
+ </ p >
48
+ ) : (
49
+ < p >
50
+ O abrigo < b > não</ b > aceita animais
51
+ </ p >
52
+ )
53
+ ) : (
54
+ < b > Não informado se aceita animais</ b >
55
+ )
56
+ }
57
+ />
58
+ < InfoRow
59
+ icon = { < HandHeart /> }
60
+ label = "Pessoas abrigadas:"
61
+ value = {
62
+ check ( shelter . shelteredPeople )
63
+ ? `${ shelter . shelteredPeople } pessoas`
64
+ : 'Não informado'
65
+ }
66
+ />
67
+ < InfoRow
68
+ icon = { < UsersRound /> }
69
+ label = "Capacidade do abrigo:"
70
+ value = {
71
+ check ( shelter . capacity )
72
+ ? `${ shelter . capacity } pessoas`
73
+ : 'Não informado'
74
+ }
75
+ />
76
+ </ Fragment >
77
+ ) }
72
78
< InfoRow
73
79
icon = { < Smartphone /> }
74
80
label = "Contato:"
0 commit comments