diff --git a/src/lib/utils.ts b/src/lib/utils.ts index fb9ac14d..67c17a57 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -40,7 +40,7 @@ function getAvailabilityProps( capacity?: number | null, shelteredPeople?: number | null ) { - if (capacity && shelteredPeople) { + if (capacity && (shelteredPeople || shelteredPeople === 0)) { if (shelteredPeople < capacity) return { availability: 'Abrigo disponível', @@ -72,12 +72,12 @@ function getSupplyPriorityProps(priority: SupplyPriority) { }; case SupplyPriority.Needing: return { - label: 'Urgente', + label: 'Precisa', className: 'bg-light-orange', }; case SupplyPriority.Urgent: return { - label: 'Necessita Urgentemente', + label: 'Precisa Urgentemente', className: 'bg-light-red', }; } diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx index 4b8a9ba7..2016a1bf 100644 --- a/src/pages/Home/Home.tsx +++ b/src/pages/Home/Home.tsx @@ -7,7 +7,7 @@ import { useShelters, useThrottle } from '@/hooks'; import { Button } from '@/components/ui/button'; const alertDescription = - 'Você pode consultar a lista de abrigos disponíveis e os itens que necessitam de doações.'; + 'Você pode consultar a lista de abrigos disponíveis. Ver e editar os itens que necessitam de doações.'; const Home = () => { const { data: shelters, loading, refresh } = useShelters(); diff --git a/src/pages/Shelter/components/ShelterCategoryItems/ShelterCategoryItems.tsx b/src/pages/Shelter/components/ShelterCategoryItems/ShelterCategoryItems.tsx index 7ee41b5a..d5c4ffa2 100644 --- a/src/pages/Shelter/components/ShelterCategoryItems/ShelterCategoryItems.tsx +++ b/src/pages/Shelter/components/ShelterCategoryItems/ShelterCategoryItems.tsx @@ -9,9 +9,9 @@ import { Button } from '@/components/ui/button'; const ShelterCategoryItems = (props: IShelterCategoryItemsProps) => { const { priority, tags } = props; const [opened, setOpened] = useState(false); - const maxVisibleTags: number = 7; + const maxVisibleTags: number = 10; const visibleTags = useMemo( - () => (opened ? tags : tags.slice(0, 7)), + () => (opened ? tags : tags.slice(0, maxVisibleTags)), [opened, tags] ); const { className: circleClassName, label } = useMemo(