Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix(COR-1811): Minor fixes (#4921)
Browse files Browse the repository at this point in the history
Co-authored-by: VWSCoronaDashboard29 <B>
  • Loading branch information
ben-van-eekelen authored Oct 30, 2023
1 parent 2a1234f commit 2aab420
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const VariantDifference = ({ value, text, isWideTable }: VariantDifferenc
renderingValue: (
<Difference color={colors.red2}>
<TrendIcon trendDirection={TrendDirection.UP} />
{formatPercentage(value.difference, options)} {text.verschil.meer}
{formatPercentage(value.difference, options)}% {text.verschil.meer}
</Difference>
),
},
Expand All @@ -44,7 +44,7 @@ export const VariantDifference = ({ value, text, isWideTable }: VariantDifferenc
renderingValue: (
<Difference color={colors.green1}>
<TrendIcon trendDirection={TrendDirection.DOWN} />
{formatPercentage(-value.difference, options)} {text.verschil.minder}
{formatPercentage(-value.difference, options)}% {text.verschil.minder}
</Difference>
),
},
Expand Down
16 changes: 14 additions & 2 deletions packages/app/src/pages/landelijk/varianten.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type LokalizeTexts = ReturnType<typeof selectLokalizeTexts>;
export const getStaticProps = createGetStaticProps(
({ locale }: { locale: keyof Languages }) => getLokalizeTexts(selectLokalizeTexts, locale),
selectNlData('variants', 'named_difference'),
selectArchivedNlData('variants_archived_20231101'),
getLastGeneratedDate,
() => {
const data = selectNlData('variants', 'named_difference')();
Expand Down Expand Up @@ -72,7 +73,18 @@ export const getStaticProps = createGetStaticProps(
);

export default function CovidVariantenPage(props: StaticProps<typeof getStaticProps>) {
const { pageText, selectedNlData: data, lastGenerated, content, variantTable, variantChart, archivedVariantChart, variantColors, dates } = props;
const {
pageText,
selectedNlData: data,
selectedArchivedNlData: archivedData,
lastGenerated,
content,
variantTable,
variantChart,
archivedVariantChart,
variantColors,
dates,
} = props;

const { commonTexts, locale } = useIntl();
const { metadataTexts, textNl } = useDynamicLokalizeTexts<LokalizeTexts>(pageText, selectLokalizeTexts);
Expand Down Expand Up @@ -207,7 +219,7 @@ export default function CovidVariantenPage(props: StaticProps<typeof getStaticPr
variantColors={variantColors}
metadata={{
datumsText: textNl.datums,
date: getLastInsertionDateOfPage(data, ['variants']),
date: archivedData.variants_archived_20231101.values[0].last_value.date_of_report_unix,
source: textNl.bronnen.rivm,
}}
/>
Expand Down

0 comments on commit 2aab420

Please sign in to comment.