diff --git a/packages/app/src/components/metadata.tsx b/packages/app/src/components/metadata.tsx index c555b272db..7717c3d9a4 100644 --- a/packages/app/src/components/metadata.tsx +++ b/packages/app/src/components/metadata.tsx @@ -35,11 +35,6 @@ export function Metadata({ date, source, obtainedAt, isTileFooter, datumsText, m ? replaceVariablesInText(commonTexts.common.metadata.date, { date: formatDateFromSeconds(date, 'weekday-long'), }) - : Array.isArray(date) - ? replaceVariablesInText(commonTexts.common.metadata.date_from_to, { - startDate: formatDateFromSeconds(date[0], 'weekday-long'), - endDate: formatDateFromSeconds(date[1], 'weekday-long'), - }) : typeof date === 'string' ? date : date && date.start && date.end diff --git a/packages/app/src/domain/variants/variants-table-tile/variants-table-tile.tsx b/packages/app/src/domain/variants/variants-table-tile/variants-table-tile.tsx index dd4f428081..df622a463c 100644 --- a/packages/app/src/domain/variants/variants-table-tile/variants-table-tile.tsx +++ b/packages/app/src/domain/variants/variants-table-tile/variants-table-tile.tsx @@ -86,7 +86,7 @@ function VariantsTableTileWithData({ const { formatDateSpan } = useIntl(); const metadata: MetadataProps = { - date: [dates.date_start_unix, dates.date_end_unix], + date: { start: dates.date_start_unix, end: dates.date_end_unix }, source, obtainedAt: dates.date_of_report_unix, }; diff --git a/packages/app/src/pages/gemeente/[code]/rioolwater.tsx b/packages/app/src/pages/gemeente/[code]/rioolwater.tsx index 63a0c826a5..ae1881f415 100644 --- a/packages/app/src/pages/gemeente/[code]/rioolwater.tsx +++ b/packages/app/src/pages/gemeente/[code]/rioolwater.tsx @@ -121,7 +121,7 @@ const SewerWater = (props: StaticProps) => { @@ -145,7 +145,7 @@ const SewerWater = (props: StaticProps) => { title={textGm.total_measurements_title} description={textGm.total_measurements_description} metadata={{ - date: [sewerInstallationMeasurement.date_start_unix, sewerInstallationMeasurement.date_end_unix], + date: { start: sewerInstallationMeasurement.date_start_unix, end: sewerInstallationMeasurement.date_end_unix }, source: textGm.bronnen.rivm, }} > diff --git a/packages/app/src/pages/gemeente/[code]/ziekenhuis-opnames.tsx b/packages/app/src/pages/gemeente/[code]/ziekenhuis-opnames.tsx index 6472c66a8e..2ab93c9a1a 100644 --- a/packages/app/src/pages/gemeente/[code]/ziekenhuis-opnames.tsx +++ b/packages/app/src/pages/gemeente/[code]/ziekenhuis-opnames.tsx @@ -138,7 +138,7 @@ function IntakeHospital(props: StaticProps) { dateEnd: formatDateFromSeconds(sevenDayAverageDates[1], 'weekday-long'), })} metadata={{ - date: sevenDayAverageDates, + date: { start: sevenDayAverageDates[0], end: sevenDayAverageDates[1] }, source: textGm.bronnen.rivm, }} > diff --git a/packages/app/src/pages/landelijk/gedrag.tsx b/packages/app/src/pages/landelijk/gedrag.tsx index 64f18eb648..9d6402d574 100644 --- a/packages/app/src/pages/landelijk/gedrag.tsx +++ b/packages/app/src/pages/landelijk/gedrag.tsx @@ -191,7 +191,7 @@ export default function BehaviorPage(props: StaticProps) ) { title={ElderlyPeopleText.hospital_admissions.kpi_titel} description={ElderlyPeopleText.hospital_admissions.kpi_toelichting} metadata={{ - date: [vulnerableHospitalAdmissionsData.date_start_unix, vulnerableHospitalAdmissionsData.date_end_unix], + date: { start: vulnerableHospitalAdmissionsData.date_start_unix, end: vulnerableHospitalAdmissionsData.date_end_unix }, source: ElderlyPeopleText.bronnen.rivm, }} > diff --git a/packages/app/src/pages/landelijk/rioolwater.tsx b/packages/app/src/pages/landelijk/rioolwater.tsx index 3f5bf403ca..f2c816e103 100644 --- a/packages/app/src/pages/landelijk/rioolwater.tsx +++ b/packages/app/src/pages/landelijk/rioolwater.tsx @@ -151,7 +151,7 @@ const SewerWater = (props: StaticProps) => { title={textNl.map_titel} description={textNl.map_toelichting} metadata={{ - date: [choropleth.gm.sewer[0].date_start_unix, choropleth.gm.sewer[0].date_end_unix], + date: { start: choropleth.gm.sewer[0].date_start_unix, end: choropleth.gm.sewer[0].date_end_unix }, source: textNl.bronnen.rivm, }} valueAnnotation={commonTexts.waarde_annotaties.riool_normalized} diff --git a/packages/app/src/pages/landelijk/vaccinaties.tsx b/packages/app/src/pages/landelijk/vaccinaties.tsx index b19472e1f1..efa9a3c22a 100644 --- a/packages/app/src/pages/landelijk/vaccinaties.tsx +++ b/packages/app/src/pages/landelijk/vaccinaties.tsx @@ -274,7 +274,7 @@ function VaccinationPage(props: StaticProps) { data={currentData.vaccine_administered_last_timeframe.vaccine_types} metadata={{ source: textShared.bronnen.rivm, - date: [currentData.vaccine_administered_last_timeframe.date_start_unix, currentData.vaccine_administered_last_timeframe.date_end_unix], + date: { start: currentData.vaccine_administered_last_timeframe.date_start_unix, end: currentData.vaccine_administered_last_timeframe.date_end_unix }, obtainedAt: currentData.vaccine_administered_last_timeframe.date_of_insertion_unix, }} /> @@ -458,10 +458,10 @@ function VaccinationPage(props: StaticProps) { description={textNl.grafiek_draagvlak.omschrijving} metadata={{ datumsText: textNl.grafiek_draagvlak.metadata_tekst, - date: [ - archivedData.vaccine_vaccinated_or_support_archived_20230411.last_value.date_start_unix, - archivedData.vaccine_vaccinated_or_support_archived_20230411.last_value.date_end_unix, - ], + date: { + start: archivedData.vaccine_vaccinated_or_support_archived_20230411.last_value.date_start_unix, + end: archivedData.vaccine_vaccinated_or_support_archived_20230411.last_value.date_end_unix, + }, }} >