Skip to content

Commit

Permalink
Merge branch 'staging' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Feb 15, 2023
2 parents a36f56a + 8c73af4 commit 67aa3b5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/components/blocs/localisations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ export default function LocalisationsComponent() {

const renderAddress = (localisation) => {
// eslint-disable-next-line max-len
const address = ` ${localisation?.distributionStatement || ''}
${(localisation?.distributionStatement) ? ',' : ''}
${localisation?.address || ''}
${(localisation?.address) ? ',' : ''}
${localisation?.place || ''}
${(localisation?.place) ? ',' : ''}
${localisation?.postalCode || ''}
${localisation?.locality || localisation?.city || ''},
${localisation?.country}`;
let address = '';
if (localisation.distributionStatement) { address += `${localisation.distributionStatement },\n`; }
if (localisation.address) { address += `${localisation.address },\n`; }
if (localisation.place) { address += `${localisation.place },\n`; }
if (localisation.postOfficeBoxNumber) { address += `${localisation.postOfficeBoxNumber },\n`; }
if (localisation.postalCode) { address += `${localisation.postalCode },\n`; }
if (localisation.city) { address += `${localisation.city },\n`; }
if (localisation.country) { address += `${localisation.country}\n`; }

return (
<div className={`fr-card fr-card--xs fr-card--horizontal fr-card--grey fr-card--no-border card-${apiObject}`}>
<div className="fr-card__body">
Expand Down

0 comments on commit 67aa3b5

Please sign in to comment.