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

Commit

Permalink
fix(COR-1420): Fixed NL and GM links for the positive tests page (#4835)
Browse files Browse the repository at this point in the history
* fix(COR-1420): Fixed NL and GM links for the positive tests page

* fix(COR-1420): Fixed TS error
  • Loading branch information
VWSCoronaDashboard30 authored Aug 9, 2023
1 parent 9243d06 commit a87f65c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/app/src/components/sitemap/use-data-sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function useDataSitemap(base: 'nl' | 'gm', code?: string, data?: Pick<Nl,
links: [
{
text: commonTexts.sidebar.metrics.positive_tests.title,
href: reverseRouter.gm.positiefTesten(code),
href: reverseRouter.gm.positieveTesten(code),
},
{
text: commonTexts.sidebar.metrics.mortality.title,
Expand Down Expand Up @@ -58,7 +58,7 @@ export function useDataSitemap(base: 'nl' | 'gm', code?: string, data?: Pick<Nl,
links: [
{
text: commonTexts.sidebar.metrics.positive_tests.title,
href: reverseRouter.nl.positiefTesten(),
href: reverseRouter.nl.positieveTesten(),
},
{
text: commonTexts.sidebar.metrics.reproduction_number.title,
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/domain/layout/logic/use-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const mapKeysToReverseRouter = {
// Still the nursing home care name is used because of legacy naming inside of sanity's lokalize texts.
nursing_home_care: 'kwetsbareGroepen',
patients: 'patientenInBeeld',
positive_tests: 'positiefTesten',
positive_tests: 'positieveTesten',
reproduction_number: 'reproductiegetal',
sewage_measurement: 'rioolwater',
tests: 'testen',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
dataOptions={{
selectedCode: data.code,
highlightSelection: true,
getLink: reverseRouter.gm.positiefTesten,
getLink: reverseRouter.gm.positieveTesten,
}}
/>
</ChoroplethTile>
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/landelijk/positieve-testen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
},
}}
dataOptions={{
getLink: reverseRouter.gm.positiefTesten,
getLink: reverseRouter.gm.positieveTesten,
}}
/>
</ChoroplethTile>
Expand Down
4 changes: 2 additions & 2 deletions packages/common/src/data/reverse-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getReverseRouter(isMobile: boolean) {
nl: {
index: () => (isMobile ? '/landelijk' : reverseRouter.nl.rioolwater()),
vaccinaties: () => '/landelijk/vaccinaties',
positiefTesten: () => '/landelijk/positief-testen',
positieveTesten: () => '/landelijk/positieve-testen',
testen: () => '/landelijk/testen',
besmettelijkeMensen: () => '/landelijk/besmettelijke-mensen',
reproductiegetal: () => '/landelijk/reproductiegetal',
Expand All @@ -39,7 +39,7 @@ export function getReverseRouter(isMobile: boolean) {

gm: {
index: (code?: string) => (code ? (isMobile ? `/gemeente/${code}` : reverseRouter.gm.rioolwater(code)) : '/gemeente'),
positiefTesten: (code: string) => `/gemeente/${code}/positief-testen`,
positieveTesten: (code: string) => `/gemeente/${code}/positieve-testen`,
sterfte: (code: string) => `/gemeente/${code}/sterfte`,
ziekenhuisopnames: (code: string) => `/gemeente/${code}/ziekenhuis-opnames`,
rioolwater: (code: string) => `/gemeente/${code}/rioolwater`,
Expand Down

0 comments on commit a87f65c

Please sign in to comment.