diff --git a/packages/app/schema/topical/theme_tile.json b/packages/app/schema/topical/theme_tile.json
index fb5be4b29d..125776c34c 100644
--- a/packages/app/schema/topical/theme_tile.json
+++ b/packages/app/schema/topical/theme_tile.json
@@ -9,7 +9,8 @@
"dynamicDescription",
"trendIcon",
"tileIcon",
- "cta"
+ "cta",
+ "kpiValue"
],
"properties": {
"index": {
diff --git a/packages/app/src/domain/topical/components/topical-tile.tsx b/packages/app/src/domain/topical/components/topical-tile.tsx
index 1358491a0c..fa27a25dbd 100644
--- a/packages/app/src/domain/topical/components/topical-tile.tsx
+++ b/packages/app/src/domain/topical/components/topical-tile.tsx
@@ -28,7 +28,7 @@ interface TopicalTileProps {
tileIcon: TopicalIcon;
trendIcon: TrendIcon | null;
dynamicDescription: string;
- kpiValue: number | undefined | string;
+ kpiValue: number | null | string;
cta: Cta | null;
}
diff --git a/packages/app/src/domain/vaccine/booster-shot-coverage-per-age-group/components/narrow-coverage-table.tsx b/packages/app/src/domain/vaccine/booster-shot-coverage-per-age-group/components/narrow-coverage-table.tsx
index ed030bc8b6..cf7ba5a8c4 100644
--- a/packages/app/src/domain/vaccine/booster-shot-coverage-per-age-group/components/narrow-coverage-table.tsx
+++ b/packages/app/src/domain/vaccine/booster-shot-coverage-per-age-group/components/narrow-coverage-table.tsx
@@ -4,10 +4,7 @@ import { useIntl } from '~/intl';
import { formatAgeGroupString } from '~/utils/format-age-group-string';
import { formatBirthyearRangeString } from '~/utils/format-birthyear-range-string';
import { useVaccineCoveragePercentageFormatter } from '~/domain/vaccine/logic/use-vaccine-coverage-percentage-formatter';
-import {
- COLOR_FULLY_VACCINATED,
- COLOR_FULLY_BOOSTERED,
-} from '~/domain/vaccine/common';
+import { COLOR_FULLY_VACCINATED, COLOR_FULLY_BOOSTERED } from '~/domain/vaccine/common';
import { Bar } from '~/domain/vaccine/components/bar';
import { NarrowPercentage } from '~/domain/vaccine/components/narrow-percentage';
import { AgeGroup } from '~/domain/vaccine/components/age-group';
@@ -23,10 +20,7 @@ export function NarrowCoverageTable({
text,
}: {
text: SiteText['pages']['vaccinations_page']['nl'];
- values:
- | NlVaccineCoveragePerAgeGroupArchived_20220908Value[]
- | VrVaccineCoveragePerAgeGroupArchived_20220908Value[]
- | GmVaccineCoveragePerAgeGroupArchived_20220908Value[];
+ values: NlVaccineCoveragePerAgeGroupArchived_20220908Value[] | VrVaccineCoveragePerAgeGroupArchived_20220908Value[] | GmVaccineCoveragePerAgeGroupArchived_20220908Value[];
}) {
const { commonTexts, formatPercentage } = useIntl();
const formatCoveragePercentage = useVaccineCoveragePercentageFormatter();
@@ -34,32 +28,15 @@ export function NarrowCoverageTable({
return (
-
- {text.vaccination_coverage.headers.agegroup}
-
+ {text.vaccination_coverage.headers.agegroup}
{values.map((item, index) => (
-
+
@@ -67,10 +44,7 @@ export function NarrowCoverageTable({
@@ -100,19 +70,13 @@ export function NarrowCoverageTable({
: `${formatPercentage(item.booster_shot_percentage)}%`
}
color={COLOR_FULLY_BOOSTERED}
- textLabel={
- text.archived.vaccination_coverage.headers.booster_shot
- }
+ textLabel={text.archived.vaccination_coverage.campaign_headers.booster_shot}
/>
diff --git a/packages/app/src/domain/vaccine/booster-shot-coverage-per-age-group/components/wide-coverage-table.tsx b/packages/app/src/domain/vaccine/booster-shot-coverage-per-age-group/components/wide-coverage-table.tsx
index 80c6af6ccc..0061bc31b6 100644
--- a/packages/app/src/domain/vaccine/booster-shot-coverage-per-age-group/components/wide-coverage-table.tsx
+++ b/packages/app/src/domain/vaccine/booster-shot-coverage-per-age-group/components/wide-coverage-table.tsx
@@ -12,20 +12,14 @@ import { asResponsiveArray } from '~/style/utils';
import { formatAgeGroupString } from '~/utils/format-age-group-string';
import { formatBirthyearRangeString } from '~/utils/format-birthyear-range-string';
import { useVaccineCoveragePercentageFormatter } from '~/domain/vaccine/logic/use-vaccine-coverage-percentage-formatter';
-import {
- COLOR_FULLY_VACCINATED,
- COLOR_FULLY_BOOSTERED,
-} from '~/domain/vaccine/common';
+import { COLOR_FULLY_VACCINATED, COLOR_FULLY_BOOSTERED } from '~/domain/vaccine/common';
import { Bar } from '~/domain/vaccine/components/bar';
import { WidePercentage } from '~/domain/vaccine/components/wide-percentage';
import { AgeGroup } from '~/domain/vaccine/components/age-group';
import { SiteText } from '~/locale';
interface WideCoverageTable {
text: SiteText['pages']['vaccinations_page']['nl'];
- values:
- | NlVaccineCoveragePerAgeGroupArchived_20220908Value[]
- | VrVaccineCoveragePerAgeGroupArchived_20220908Value[]
- | GmVaccineCoveragePerAgeGroupArchived_20220908Value[];
+ values: NlVaccineCoveragePerAgeGroupArchived_20220908Value[] | VrVaccineCoveragePerAgeGroupArchived_20220908Value[] | GmVaccineCoveragePerAgeGroupArchived_20220908Value[];
}
export function WideCoverageTable({ values, text }: WideCoverageTable) {
@@ -51,9 +45,7 @@ export function WideCoverageTable({ values, text }: WideCoverageTable) {
}),
})}
>
-
- {text.vaccination_coverage.headers.agegroup}
-
+ {text.vaccination_coverage.headers.agegroup}
-
- {text.vaccination_coverage.headers.fully_vaccinated}
-
+ {text.vaccination_coverage.headers.fully_vaccinated}
-
- {text.archived.vaccination_coverage.headers.booster_shot}
-
+ {text.archived.vaccination_coverage.campaign_headers.booster_shot}
-
- {
- text.archived.vaccination_coverage.headers
- .difference_booster_shot_and_fully_vaccinated
- }
-
+ {text.archived.vaccination_coverage.campaign_headers.difference_booster_shot_and_fully_vaccinated}
@@ -105,17 +88,9 @@ export function WideCoverageTable({ values, text }: WideCoverageTable) {
@@ -123,10 +98,7 @@ export function WideCoverageTable({ values, text }: WideCoverageTable) {
diff --git a/packages/app/src/domain/vaccine/vaccine-coverage-per-age-group/components/narrow-coverage-table.tsx b/packages/app/src/domain/vaccine/vaccine-coverage-per-age-group/components/narrow-coverage-table.tsx
index 821a786b8d..c76fc99651 100644
--- a/packages/app/src/domain/vaccine/vaccine-coverage-per-age-group/components/narrow-coverage-table.tsx
+++ b/packages/app/src/domain/vaccine/vaccine-coverage-per-age-group/components/narrow-coverage-table.tsx
@@ -8,11 +8,7 @@ import { ARCHIVED_COLORS } from '~/domain/vaccine/common';
import { Bar } from '~/domain/vaccine/components/bar';
import { NarrowPercentage } from '~/domain/vaccine/components/narrow-percentage';
import { AgeGroup } from '~/domain/vaccine/components/age-group';
-import {
- GmVaccineCoveragePerAgeGroupArchivedValue,
- NlVaccineCoveragePerAgeGroupArchivedValue,
- VrVaccineCoveragePerAgeGroupArchivedValue,
-} from '@corona-dashboard/common';
+import { GmVaccineCoveragePerAgeGroupArchivedValue, NlVaccineCoveragePerAgeGroupArchivedValue, VrVaccineCoveragePerAgeGroupArchivedValue } from '@corona-dashboard/common';
import { SiteText } from '~/locale';
export function NarrowCoverageTable({
@@ -20,10 +16,7 @@ export function NarrowCoverageTable({
text,
}: {
text: SiteText['pages']['vaccinations_page']['nl'];
- values:
- | NlVaccineCoveragePerAgeGroupArchivedValue[]
- | VrVaccineCoveragePerAgeGroupArchivedValue[]
- | GmVaccineCoveragePerAgeGroupArchivedValue[];
+ values: NlVaccineCoveragePerAgeGroupArchivedValue[] | VrVaccineCoveragePerAgeGroupArchivedValue[] | GmVaccineCoveragePerAgeGroupArchivedValue[];
}) {
const { commonTexts, formatPercentage } = useIntl();
const formatCoveragePercentage = useVaccineCoveragePercentageFormatter();
@@ -31,54 +24,29 @@ export function NarrowCoverageTable({
return (
-
- {text.vaccination_coverage.headers.agegroup}
-
+ {text.vaccination_coverage.headers.agegroup}
{values.map((item, index) => (
-
+
@@ -88,24 +56,17 @@ export function NarrowCoverageTable({
diff --git a/packages/app/src/domain/vaccine/vaccine-coverage-per-age-group/components/wide-coverage-table.tsx b/packages/app/src/domain/vaccine/vaccine-coverage-per-age-group/components/wide-coverage-table.tsx
index f9d17f1981..6e9b44eb74 100644
--- a/packages/app/src/domain/vaccine/vaccine-coverage-per-age-group/components/wide-coverage-table.tsx
+++ b/packages/app/src/domain/vaccine/vaccine-coverage-per-age-group/components/wide-coverage-table.tsx
@@ -1,8 +1,4 @@
-import {
- GmVaccineCoveragePerAgeGroupArchivedValue,
- NlVaccineCoveragePerAgeGroupArchivedValue,
- VrVaccineCoveragePerAgeGroupArchivedValue,
-} from '@corona-dashboard/common';
+import { GmVaccineCoveragePerAgeGroupArchivedValue, NlVaccineCoveragePerAgeGroupArchivedValue, VrVaccineCoveragePerAgeGroupArchivedValue } from '@corona-dashboard/common';
import css from '@styled-system/css';
import styled from 'styled-components';
import { Box } from '~/components/base';
@@ -19,10 +15,7 @@ import { AgeGroup } from '~/domain/vaccine/components/age-group';
import { SiteText } from '~/locale';
interface WideCoverageTable {
text: SiteText['pages']['vaccinations_page']['nl'];
- values:
- | NlVaccineCoveragePerAgeGroupArchivedValue[]
- | VrVaccineCoveragePerAgeGroupArchivedValue[]
- | GmVaccineCoveragePerAgeGroupArchivedValue[];
+ values: NlVaccineCoveragePerAgeGroupArchivedValue[] | VrVaccineCoveragePerAgeGroupArchivedValue[] | GmVaccineCoveragePerAgeGroupArchivedValue[];
}
export function WideCoverageTable({ values, text }: WideCoverageTable) {
@@ -48,9 +41,7 @@ export function WideCoverageTable({ values, text }: WideCoverageTable) {
}),
})}
>
-
- {text.vaccination_coverage.headers.agegroup}
-
+ {text.vaccination_coverage.headers.agegroup}
-
- {text.archived.vaccination_coverage.headers.first_shot}
-
+ {text.archived.vaccination_coverage.campaign_headers.first_shot}
-
- {text.archived.vaccination_coverage.headers.coverage}
-
+ {text.archived.vaccination_coverage.campaign_headers.coverage}
-
- {text.archived.vaccination_coverage.headers.difference}
-
+ {text.archived.vaccination_coverage.campaign_headers.difference}
@@ -99,30 +84,15 @@ export function WideCoverageTable({ values, text }: WideCoverageTable) {
@@ -131,10 +101,7 @@ export function WideCoverageTable({ values, text }: WideCoverageTable) {
|
diff --git a/packages/app/src/static-props/get-data.ts b/packages/app/src/static-props/get-data.ts
index 9bcc799c33..ea2a32586e 100644
--- a/packages/app/src/static-props/get-data.ts
+++ b/packages/app/src/static-props/get-data.ts
@@ -187,7 +187,7 @@ export function selectTopicalData(locale: keyof Languages) {
themeTiles: theme.themeTiles.map((tile) => ({
index: tile.index,
title: tile.title[localeKey],
- kpiValue: tile?.kpiValue === null ? undefined : tile.kpiValue,
+ kpiValue: tile.kpiValue ? tile.kpiValue : null,
dynamicDescription: tile.dynamicDescription[localeKey],
trendIcon: tile.trendIcon && {
direction: tile.trendIcon.direction,