Skip to content

Commit ee8c0b7

Browse files
authored
Merge pull request #14 from SOS-RS/feat/verified
feat: added verified seal to shelters
2 parents 73eb1fc + fcdd0b6 commit ee8c0b7

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

src/components/ShelterListItem/ShelterListItem.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useMemo } from 'react';
22
import { format } from 'date-fns';
33
import { useNavigate } from 'react-router-dom';
4-
import { ChevronRight } from 'lucide-react';
4+
import { BadgeCheck, ChevronRight } from 'lucide-react';
55

66
import { IShelterListItemProps, IShelterAvailabilityProps } from './types';
77
import { cn, getAvailabilityProps, getSupplyPriorityProps } from '@/lib/utils';
@@ -38,12 +38,17 @@ const ShelterListItem = (props: IShelterListItemProps) => {
3838
>
3939
<ChevronRight className="h-5 w-5" />
4040
</Button>
41-
<h3
42-
className="font-semibold text-lg mr-12 hover:cursor-pointer hover:text-slate-500"
43-
onClick={() => navigate(`/abrigo/${data.id}`)}
44-
>
45-
{data.name}
46-
</h3>
41+
<div className="flex items-center gap-1">
42+
{data.verified && (
43+
<BadgeCheck className="h-5 w-5 stroke-white fill-red-600" />
44+
)}
45+
<h3
46+
className="font-semibold text-lg mr-12 hover:cursor-pointer hover:text-slate-500"
47+
onClick={() => navigate(`/abrigo/${data.id}`)}
48+
>
49+
{data.name}
50+
</h3>
51+
</div>
4752
<h6 className={cn('font-semibold text-md', availabilityClassName)}>
4853
{availability}
4954
</h6>

src/hooks/useShelter/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export interface IUseShelterData {
88
contact?: string | null;
99
petFriendly?: boolean | null;
1010
prioritySum: number;
11+
verified: boolean;
1112
latitude?: string | null;
1213
longitude?: string | null;
1314
shelterSupplies: IUseShelterDataSupply[];

src/hooks/useShelters/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export interface IUseSheltersData {
88
contact?: string | null;
99
petFriendly?: boolean | null;
1010
prioritySum: number;
11+
verified: boolean;
1112
latitude?: string | null;
1213
longitude?: string | null;
1314
createdAt: string;

src/pages/Shelter/Shelter.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useMemo } from 'react';
2-
import { ChevronLeft, Pencil } from 'lucide-react';
2+
import { BadgeCheck, ChevronLeft, Pencil } from 'lucide-react';
33
import { useNavigate, useParams } from 'react-router-dom';
44

55
import { CardAboutShelter, Header, LoadingScreen } from '@/components';
@@ -53,9 +53,14 @@ const Shelter = () => {
5353
}
5454
/>
5555
<div className="p-4 flex flex-col max-w-5xl w-full">
56-
<h1 className="text-[#2f2f2f] font-semibold text-2xl">
57-
{shelter.name}
58-
</h1>
56+
<div className="flex items-center gap-1">
57+
{shelter.verified && (
58+
<BadgeCheck className="h-6 w-6 stroke-white fill-red-600" />
59+
)}
60+
<h1 className="text-[#2f2f2f] font-semibold text-2xl">
61+
{shelter.name}
62+
</h1>
63+
</div>
5964
<div className="flex flex-1 items-center justify-between">
6065
<h1 className={cn(availabilityClassName, 'font-semibold')}>
6166
{availability}

0 commit comments

Comments
 (0)