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

Feature/COR-1392-text-gm-positive-tests-is-in-bold-should-be-normal-text #4662

Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useState } from 'react';
import { GgdTesten } from '@corona-dashboard/icons';
import { GetStaticPropsContext } from 'next';
import { Box } from '~/components/base';
import { Text, InlineText, BoldText } from '~/components/typography';
import { Text } from '~/components/typography';
import {
Jorrik-Klijnsma-Work marked this conversation as resolved.
Show resolved Hide resolved
ChartTile,
DynamicChoropleth,
Expand Down Expand Up @@ -66,8 +66,8 @@ export const getStaticProps = createGetStaticProps(
}>((context) => {
const { locale } = context;
return `{
"parts": ${getPagePartsQuery('positive_tests_page')},
"elements": ${getElementsQuery('gm', ['tested_overall'], locale)}
"parts": ${getPagePartsQuery('positive_tests_page')},
"elements": ${getElementsQuery('gm', ['tested_overall'], locale)}
}`;
})(context);
return {
Expand Down Expand Up @@ -143,12 +143,12 @@ function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
<Markdown content={textGm.infected_kpi.description} />

<Box spacing={3}>
<BoldText variant="body2">
{replaceComponentsInText(textGm.infected_kpi.last_value_text, {
infected: <InlineText color="data.primary">{`${formatNumber(lastValue.infected)}`}</InlineText>,
<Markdown
content={replaceVariablesInText(textGm.infected_kpi.last_value_text, {
infected: formatNumber(lastValue.infected),
dateTo: formatDateFromSeconds(lastValue.date_unix, 'weekday-long'),
})}
</BoldText>
/>
{textGm.infected_kpi.link_cta && <Markdown content={textGm.infected_kpi.link_cta} />}
</Box>
</KpiTile>
Expand Down Expand Up @@ -219,18 +219,18 @@ function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
description={
<>
<Markdown content={textGm.map_toelichting} />
<BoldText variant="body2">
{replaceComponentsInText(textGm.map_last_value_text, {
infected_per_100k: <InlineText color="data.primary">{`${formatNumber(lastValue.infected_per_100k)}`}</InlineText>,
<Markdown
content={replaceVariablesInText(textGm.map_last_value_text, {
infected_per_100k: formatNumber(lastValue.infected_per_100k),
municipality: municipalityName,
})}
</BoldText>
<BoldText variant="body2">
{replaceComponentsInText(textGm.map_safety_region_last_value_text, {
infected_per_100k: <InlineText color="data.primary">{`${formatNumber(vrData?.infected_per_100k)}`}</InlineText>,
/>
<Markdown
content={replaceVariablesInText(textGm.map_safety_region_last_value_text, {
infected_per_100k: formatNumber(vrData?.infected_per_100k),
safetyRegion: vrForMunicipality?.name,
})}
</BoldText>
/>
</>
}
legend={{
Expand Down