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

Commit

Permalink
feat(COR-1837): Set timeframe of archived graphs to max
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-van-eekelen committed Dec 18, 2023
1 parent 2343243 commit 89792e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface VariantsStackedAreaTileProps {
}

export const VariantsStackedAreaTile = ({ text, values, variantColors, metadata }: VariantsStackedAreaTileProps) => {
const [variantStackedAreaTimeframe, setVariantStackedAreaTimeframe] = useState<TimeframeOption>(TimeframeOption.THREE_MONTHS);
const [variantStackedAreaTimeframe, setVariantStackedAreaTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);

const { list, toggle, clear } = useList<keyof VariantChartValue>(alwaysEnabled);

Expand Down Expand Up @@ -54,7 +54,7 @@ export const VariantsStackedAreaTile = ({ text, values, variantColors, metadata
description={text.toelichting}
metadata={metadata}
timeframeOptions={TimeframeOptionsList}
timeframeInitialValue={TimeframeOption.THREE_MONTHS}
timeframeInitialValue={variantStackedAreaTimeframe}
onSelectTimeframe={setVariantStackedAreaTimeframe}
>
<InteractiveLegend helpText={text.legend_help_tekst} selectOptions={selectOptions} selection={list} onToggleItem={toggle} onReset={clear} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const getStaticProps = createGetStaticProps(

function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
const { pageText, selectedGmData: data, selectedArchivedGmData: archivedData, archivedChoropleth, municipalityName, content, lastGenerated } = props;
const [positivelyTestedPeopleTimeframe, setpositivelyTestedPeopleTimeframe] = useState<TimeframeOption>(TimeframeOption.SIX_MONTHS);
const [positivelyTestedPeopleTimeframe, setpositivelyTestedPeopleTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);
const { commonTexts, formatNumber, formatDateFromSeconds } = useIntl();
const reverseRouter = useReverseRouter();
const { textGm, textShared } = useDynamicLokalizeTexts<LokalizeTexts>(pageText, selectLokalizeTexts);
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 @@ -78,7 +78,7 @@ export const getStaticProps = createGetStaticProps(
function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
const { pageText, selectedArchivedNlData: data, archivedChoropleth, content, lastGenerated } = props;

const [confirmedCasesInfectedTimeframe, setConfirmedCasesInfectedTimeframe] = useState<TimeframeOption>(TimeframeOption.SIX_MONTHS);
const [confirmedCasesInfectedTimeframe, setConfirmedCasesInfectedTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);

const [confirmedCasesInfectedPercentageTimeframe, setConfirmedCasesInfectedPercentageTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);

Expand Down

0 comments on commit 89792e1

Please sign in to comment.