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

Commit

Permalink
feat: COR-1509-removed Gedrag archived section (#4704)
Browse files Browse the repository at this point in the history
* feat: removed gedrag archived section

* fix: clean commented lines

---------

Co-authored-by: VWSCoronaDashboard27 <[email protected]>
  • Loading branch information
DariaKwork and VWSCoronaDashboard27 authored Mar 27, 2023
1 parent f772410 commit 7247820
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 184 deletions.
155 changes: 0 additions & 155 deletions packages/app/src/domain/behavior/behavior-choropleths-tile.tsx

This file was deleted.

32 changes: 3 additions & 29 deletions packages/app/src/pages/landelijk/gedrag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ import { GetStaticPropsContext } from 'next';
import { middleOfDayInSeconds } from '@corona-dashboard/common';
import { useMemo, useRef, useState } from 'react';
import { Box } from '~/components/base';
import { Divider } from '~/components/divider';
import { Heading } from '~/components/typography';
import { Markdown } from '~/components/markdown';
import { PageInformationBlock } from '~/components/page-information-block';
import { Tile } from '~/components/tile';
import { TileList } from '~/components/tile-list';
import { TwoKpiSection } from '~/components/two-kpi-section';
import { BehaviorChoroplethsTile } from '~/domain/behavior/behavior-choropleths-tile';
import { BehaviorLineChartTile } from '~/domain/behavior/behavior-line-chart-tile';
import { BehaviorPerAgeGroup } from '~/domain/behavior/behavior-per-age-group-tile';
import { BehaviorTableTile } from '~/domain/behavior/behavior-table-tile';
Expand All @@ -22,7 +20,7 @@ import { useIntl } from '~/intl';
import { Languages, SiteText } from '~/locale';
import { getArticleParts, getPagePartsQuery } from '~/queries/get-page-parts-query';
import { createGetStaticProps, StaticProps } from '~/static-props/create-get-static-props';
import { createGetChoroplethData, createGetContent, getLastGeneratedDate, selectNlData, getLokalizeTexts } from '~/static-props/get-data';
import { createGetContent, getLastGeneratedDate, selectNlData, getLokalizeTexts } from '~/static-props/get-data';
import { ArticleParts, PagePartQueryResult } from '~/types/cms';
import { replaceVariablesInText } from '~/utils/replace-variables-in-text';
import { getLastInsertionDateOfPage } from '~/utils/get-last-insertion-date-of-page';
Expand All @@ -44,9 +42,7 @@ export const getStaticProps = createGetStaticProps(
({ locale }: { locale: keyof Languages }) => getLokalizeTexts(selectLokalizeTexts, locale),
getLastGeneratedDate,
selectNlData('behavior', 'behavior_annotations', 'behavior_per_age_group'),
createGetChoroplethData({
vr: ({ behavior_archived_20221019 }) => ({ behavior_archived_20221019 }),
}),

async (context: GetStaticPropsContext) => {
const { content } = await createGetContent<PagePartQueryResult<ArticleParts>>(() => getPagePartsQuery('behavior_page'))(context);

Expand All @@ -59,7 +55,7 @@ export const getStaticProps = createGetStaticProps(
);

export default function BehaviorPage(props: StaticProps<typeof getStaticProps>) {
const { pageText, selectedNlData: data, choropleth, content, lastGenerated } = props;
const { pageText, selectedNlData: data, content, lastGenerated } = props;
const behaviorLastValue = data.behavior.last_value;

const { formatNumber, formatDateFromSeconds, formatPercentage, locale } = useIntl();
Expand All @@ -76,8 +72,6 @@ export default function BehaviorPage(props: StaticProps<typeof getStaticProps>)

const behaviorLookupKeys = useBehaviorLookupKeys();

const [hasHideArchivedCharts, setHideArchivedCharts] = useState<boolean>(false);

const { highestCompliance, highestSupport } = useMemo(() => {
const list = behaviorLookupKeys.map((x) => ({
description: x.description,
Expand Down Expand Up @@ -207,26 +201,6 @@ export default function BehaviorPage(props: StaticProps<typeof getStaticProps>)
}}
/>
)}

<Divider />

<PageInformationBlock
title={textNl.section_archived.title}
description={textNl.section_archived.description}
isArchivedHidden={hasHideArchivedCharts}
onToggleArchived={() => setHideArchivedCharts(!hasHideArchivedCharts)}
/>

{hasHideArchivedCharts && (
<BehaviorChoroplethsTile
title={textNl.verdeling_in_nederland.titel}
description={textNl.verdeling_in_nederland.description}
data={choropleth.vr}
currentId={currentId}
setCurrentId={setCurrentId}
text={text}
/>
)}
</TileList>
</NlLayout>
</Layout>
Expand Down
10 changes: 10 additions & 0 deletions packages/cms/src/lokalize/key-mutations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ timestamp,action,key,document_id,move_to
2023-03-21T10:20:30.147Z,add,common.variant_codes.XBF,ps9F7aH5kHk3YIueyBwB9V,__
2023-03-21T12:32:29.754Z,delete,common.variant_codes.XBB_1_6,ps9F7aH5kHk3YIueyBwAgr,__
2023-03-21T12:35:01.148Z,add,common.variant_codes.XBB_1_16,qAiz52vTEAxO2GlVGsTNF8,__
2023-03-22T11:31:11.144Z,delete,pages.behavior_page.nl.section_archived.description,ibZWLQHfYl2AyCZBOq5lUb,__
2023-03-22T11:31:11.146Z,delete,pages.behavior_page.nl.section_archived.title,rSoN2URF0rxEHQvXsrmWoN,__
2023-03-22T11:31:11.154Z,delete,pages.behavior_page.nl.verdeling_in_nederland.compliance_title,jwZCGJpB6f5MPNxDruqUQy,__
2023-03-22T11:31:11.159Z,delete,pages.behavior_page.nl.verdeling_in_nederland.description,2HjSiE19Y3xp0kLX6T6JA7,__
2023-03-22T11:31:11.162Z,delete,pages.behavior_page.nl.verdeling_in_nederland.geen_beschikbare_data,2HjSiE19Y3xp0kLX6T6aOP,__
2023-03-22T11:31:11.164Z,delete,pages.behavior_page.nl.verdeling_in_nederland.intro,jF33EuwumlGuwav2FD3sv6,__
2023-03-22T11:31:11.166Z,delete,pages.behavior_page.nl.verdeling_in_nederland.legenda_titel,jF33EuwumlGuwav2FD3syS,__
2023-03-22T11:31:11.168Z,delete,pages.behavior_page.nl.verdeling_in_nederland.onbekend,jF33EuwumlGuwav2FD3swm,__
2023-03-22T11:31:11.171Z,delete,pages.behavior_page.nl.verdeling_in_nederland.support_title,jwZCGJpB6f5MPNxDrurJfa,__
2023-03-22T11:31:11.175Z,delete,pages.behavior_page.nl.verdeling_in_nederland.titel,jF33EuwumlGuwav2FD3stQ,__
2023-03-21T10:35:31.652Z,delete,pages.vaccinations_page.gm.vaccination_grade_toggle_tile.description_footer,4Hn4MB4VRci1fnngMVhx1g,__
2023-03-21T10:35:31.653Z,delete,pages.vaccinations_page.nl.vaccination_grade_toggle_tile.description_footer,qjZwg5QUJcN8JoCoxxDDJy,__
2023-03-21T10:35:31.653Z,delete,pages.vaccinations_page.shared.vaccination_grade_tile.autumn_labels.description_footer,u6z14vWwH5lzTVbDpRg06r,__
Expand Down

0 comments on commit 7247820

Please sign in to comment.