Skip to content

Commit

Permalink
Merge pull request #1943 from BaseAdresseNationale/fix-region-search
Browse files Browse the repository at this point in the history
Correction bug affichage region Dom-TOM
  • Loading branch information
vinsag authored Dec 18, 2024
2 parents 4e63518 + f53f141 commit 211f5c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/SearchBAN/SearchBAN.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const formatBanToProperties = ({
postcode: codesPostaux?.[0],
citycode: codeCommune,
city: nomCommune,
context: `${departement?.code}, ${departement?.nom}, ${region?.nom}`,
context: [departement?.code, departement?.nom, region?.nom].filter(entry => Boolean(entry)).join(', '),
})

interface TypeSearchDataInBan {
Expand Down Expand Up @@ -129,9 +129,9 @@ const itemMenuFormater = (item:

const label = name
const details = `${type === 'municipality'
? `Code Insee ${citycode} `
? `Code Insee - COG ${citycode} `
: `${city} `
}(${codeDepartement}, ${departement}, ${region})`
}(${codeDepartement}, ${departement}${region ? `, ${region}` : ''})`

return { id, header, label, details }
}
Expand Down

0 comments on commit 211f5c0

Please sign in to comment.