From a29f58030eb1bd66e3de2dd4f178e19fd7a98e7c Mon Sep 17 00:00:00 2001 From: "Sofian A. Thibaut" Date: Wed, 16 Oct 2024 18:32:41 +0200 Subject: [PATCH] Replace land type with land type label in react search component --- assets/scripts/components/widgets/SearchBar.tsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/assets/scripts/components/widgets/SearchBar.tsx b/assets/scripts/components/widgets/SearchBar.tsx index 05d19b2c9..cf02bab99 100644 --- a/assets/scripts/components/widgets/SearchBar.tsx +++ b/assets/scripts/components/widgets/SearchBar.tsx @@ -15,17 +15,9 @@ export interface Territory { source_id: string; public_key: string; area: number; - land_type: string; + land_type_label: string; } -const territoryLabels: Record = { - COMM: 'Commune', - EPCI: 'EPCI', - SCOT: 'SCOT', - DEPART: 'Département', - REGION: 'Région', -}; - const primaryColor = '#313178'; const activeColor = '#4318FF'; const secondaryColor = '#a1a1f8'; @@ -232,7 +224,7 @@ const SearchBar: React.FC = ({ createUrl }) => {
{territory.name}
- {territoryLabels[territory.land_type]} + {territory.land_type_label}
Code INSEE: {territory.source_id}