From 62524d391bff2601cf64ca78cbd181c62eae27fe Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard28 Date: Mon, 3 Jul 2023 17:19:48 +0200 Subject: [PATCH] feat(articles-redesign): Finalize 1598 related changes, refactor a few things, add a new component, some styling changes. --- .../components/articles/article-teaser.tsx | 65 ++++++++----------- .../article-update-or-publishing-date.tsx | 37 +++++++++++ .../{ => articles}/page-articles-tile.tsx | 45 +++++++------ .../[code]/positief-geteste-mensen.tsx | 2 +- .../src/pages/gemeente/[code]/rioolwater.tsx | 2 +- .../app/src/pages/gemeente/[code]/sterfte.tsx | 2 +- .../src/pages/gemeente/[code]/vaccinaties.tsx | 2 +- .../gemeente/[code]/ziekenhuis-opnames.tsx | 2 +- .../pages/landelijk/besmettelijke-mensen.tsx | 2 +- packages/app/src/pages/landelijk/gedrag.tsx | 2 +- .../src/pages/landelijk/gehandicaptenzorg.tsx | 2 +- .../kwetsbare-groepen-70-plussers.tsx | 2 +- .../pages/landelijk/patienten-in-beeld.tsx | 2 +- .../landelijk/positief-geteste-mensen.tsx | 2 +- .../src/pages/landelijk/reproductiegetal.tsx | 2 +- .../app/src/pages/landelijk/rioolwater.tsx | 2 +- packages/app/src/pages/landelijk/sterfte.tsx | 2 +- packages/app/src/pages/landelijk/testen.tsx | 2 +- .../pages/landelijk/thuiswonende-ouderen.tsx | 2 +- .../app/src/pages/landelijk/vaccinaties.tsx | 2 +- .../app/src/pages/landelijk/varianten.tsx | 2 +- .../pages/landelijk/ziekenhuizen-en-zorg.tsx | 2 +- .../app/src/queries/get-page-parts-query.ts | 3 +- 23 files changed, 111 insertions(+), 77 deletions(-) create mode 100644 packages/app/src/components/articles/article-update-or-publishing-date.tsx rename packages/app/src/components/{ => articles}/page-articles-tile.tsx (72%) diff --git a/packages/app/src/components/articles/article-teaser.tsx b/packages/app/src/components/articles/article-teaser.tsx index 5e6abcaf73..be920ddf1e 100644 --- a/packages/app/src/components/articles/article-teaser.tsx +++ b/packages/app/src/components/articles/article-teaser.tsx @@ -2,18 +2,29 @@ import { colors } from '@corona-dashboard/common'; import { ChevronRight } from '@corona-dashboard/icons'; import styled from 'styled-components'; import { useIntl } from '~/intl'; -import { radii, space } from '~/style/theme'; +import { mediaQueries, radii, space } from '~/style/theme'; import { Article, ArticleMainCategory, ArticlePublishedDate, ArticleUpdatedDate, Block, ImageBlock } from '~/types/cms'; -import { replaceComponentsInText } from '~/utils'; import { Link } from '~/utils/link'; import { BackgroundImage } from '../background-image'; import { Box } from '../base'; -import { PublicationDate } from '../publication-date'; -import { Heading, Text } from '../typography'; -import { getDateToUse } from './logic/get-date-to-use'; +import { Anchor, Heading, Text } from '../typography'; +import { ArticleUpdateOrPublishingDate } from './article-update-or-publishing-date'; export type ArticleSummary = Pick; +interface ArticleTeaserImageProps { + image: ImageBlock; + sizes: string[][]; +} + +const ArticleTeaserImage = ({ image, sizes }: ArticleTeaserImageProps) => { + return ( +
+ +
+ ); +}; + interface ArticleTeaserProps { cover: ImageBlock; coverSizes: string[][]; @@ -25,21 +36,11 @@ interface ArticleTeaserProps { updatedDate: ArticleUpdatedDate; } -const ArticleTeaserImage = ({ image, sizes }: { image: ImageBlock; sizes: string[][] }) => { - return ( -
- -
- ); -}; - -export const ArticleTeaser = (props: ArticleTeaserProps) => { - const { title, slug, summary, cover, coverSizes, mainCategory, publicationDate, updatedDate } = props; +export const ArticleTeaser = ({ title, slug, summary, cover, coverSizes, mainCategory, publicationDate, updatedDate }: ArticleTeaserProps) => { const { commonTexts } = useIntl(); - const { publishedOrUpdatedDate, isUpdatedAfterPublishing } = getDateToUse(publicationDate, updatedDate, mainCategory); return ( - +
{cover.asset && } @@ -55,15 +56,7 @@ export const ArticleTeaser = (props: ArticleTeaserProps) => { {summary} - {isUpdatedAfterPublishing ? ( - - {replaceComponentsInText(commonTexts.article_teaser.articles_updated_date, { - date: , - })} - - ) : ( - - )} + - +
); }; @@ -87,16 +80,23 @@ const ArticleTeaserContent = styled.div` } `; -const ArticleTeaserCard = styled.div` +const ArticleTeaserCard = styled(Anchor)` + border: 1px solid ${colors.gray3}; + border-radius: ${radii[2]}px; color: ${colors.black}; cursor: pointer; display: flex; flex-direction: column; height: 100%; + margin-bottom: ${space[4]}; min-height: 26rem; overflow: hidden; text-decoration: none; + @media ${mediaQueries.xs} { + margin-bottom: 0; + } + .article-teaser-image { flex-shrink: 0; height: 200px; @@ -123,15 +123,6 @@ const ArticleTeaserCard = styled.div` } `; -interface ArticlePublicationDate { - marginLeft?: string; -} - -const ArticlePublicationDate = styled(PublicationDate)` - color: ${colors.gray8}; - margin-left: ${({ marginLeft }) => (marginLeft ? marginLeft : undefined)}; -`; - const ArticleCTA = styled.strong` align-items: center; color: ${colors.blue8}; diff --git a/packages/app/src/components/articles/article-update-or-publishing-date.tsx b/packages/app/src/components/articles/article-update-or-publishing-date.tsx new file mode 100644 index 0000000000..18ff183d41 --- /dev/null +++ b/packages/app/src/components/articles/article-update-or-publishing-date.tsx @@ -0,0 +1,37 @@ +import { colors } from '@corona-dashboard/common'; +import { useIntl } from '~/intl'; +import { ArticleMainCategory, ArticlePublishedDate, ArticleUpdatedDate } from '~/types/cms'; +import { replaceComponentsInText } from '~/utils/replace-components-in-text'; +import { Box } from '../base/box'; +import { PublicationDate } from '../publication-date'; +import { InlineText } from '../typography'; +import { getDateToUse } from './logic/get-date-to-use'; + +interface ArticlePublishingDateProps { + mainCategory: ArticleMainCategory | null; + publishedDate: ArticlePublishedDate; + updatedDate: ArticleUpdatedDate; +} + +export const ArticleUpdateOrPublishingDate = ({ publishedDate, updatedDate, mainCategory }: ArticlePublishingDateProps) => { + const { commonTexts } = useIntl(); + const { publishedOrUpdatedDate, isUpdatedAfterPublishing } = getDateToUse(publishedDate, updatedDate, mainCategory); + + if (isUpdatedAfterPublishing) { + return ( + + + {replaceComponentsInText(commonTexts.article_teaser.articles_updated_date, { + date: , + })} + + + ); + } + + return ( + + + + ); +}; diff --git a/packages/app/src/components/page-articles-tile.tsx b/packages/app/src/components/articles/page-articles-tile.tsx similarity index 72% rename from packages/app/src/components/page-articles-tile.tsx rename to packages/app/src/components/articles/page-articles-tile.tsx index f3b2fb4f41..ec80b2a0da 100644 --- a/packages/app/src/components/page-articles-tile.tsx +++ b/packages/app/src/components/articles/page-articles-tile.tsx @@ -1,23 +1,22 @@ import { colors } from '@corona-dashboard/common'; +import { ChevronRight } from '@corona-dashboard/icons'; +import styled, { css } from 'styled-components'; +import { useIntl } from '~/intl'; import { getImageProps } from '~/lib/sanity'; import { fontWeights, mediaQueries, radii, space } from '~/style/theme'; -import { Box } from './base'; -import { ChartTile } from './chart-tile'; -import { SanityImage } from './cms/sanity-image'; -import { Anchor, BoldText, Text } from './typography'; -import { Link } from '~/utils/link'; -import styled, { css } from 'styled-components'; -import { PublicationDate } from './publication-date'; -import { ChevronRight } from '@corona-dashboard/icons'; import { Article } from '~/types/cms'; -import { useIntl } from '~/intl'; +import { Link } from '~/utils/link'; +import { Box } from '../base'; +import { ChartTile } from '../chart-tile'; +import { SanityImage } from '../cms/sanity-image'; +import { Anchor, BoldText, InlineText, Text } from '../typography'; +import { ArticleUpdateOrPublishingDate } from './article-update-or-publishing-date'; interface PageArticlesTileProps { articles: Article[]; title: string; } -// TODO: this should be moved to the /articles/ directory, as picked up in COR-1601 export const PageArticlesTile = ({ articles, title }: PageArticlesTileProps) => { const { commonTexts } = useIntl(); @@ -30,17 +29,18 @@ export const PageArticlesTile = ({ articles, title }: PageArticlesTileProps) => - +
{article.title} - - {/* TODO: this should be updated after COR-1601 implements publicationDate vs updateDate logic */} - {article.mainCategory && `${commonTexts.article_teaser.categories[article.mainCategory]} · `} - - - + + + {article.mainCategory && `${commonTexts.article_teaser.categories[article.mainCategory]} · `} + + + +
- {article.summary} + {article.summary} {commonTexts.article_teaser.read_more} @@ -74,10 +74,17 @@ const Grid = styled(Box)` const ArticleCard = styled(Anchor)` border-radius: ${radii[2]}px; border: 1px solid ${colors.gray3}; - display: grid; + display: flex; + flex-direction: column; gap: ${space[2]}; height: 100%; padding: ${space[3]}; + + ${Text} { + align-items: end; + display: flex; + flex-grow: 1; + } `; const ArticleCardHeader = styled(Box)` diff --git a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx index 015bfbe782..32dccf2a7e 100644 --- a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx +++ b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx @@ -12,7 +12,7 @@ import { InView } from '~/components/in-view'; import { KpiTile } from '~/components/kpi-tile'; import { KpiValue } from '~/components/kpi-value'; import { Markdown } from '~/components/markdown'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/gemeente/[code]/rioolwater.tsx b/packages/app/src/pages/gemeente/[code]/rioolwater.tsx index 6a69e1e653..63a0c826a5 100644 --- a/packages/app/src/pages/gemeente/[code]/rioolwater.tsx +++ b/packages/app/src/pages/gemeente/[code]/rioolwater.tsx @@ -6,7 +6,7 @@ import { InView } from '~/components/in-view'; import { KpiTile } from '~/components/kpi-tile'; import { KpiValue } from '~/components/kpi-value'; import { Markdown } from '~/components/markdown'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/gemeente/[code]/sterfte.tsx b/packages/app/src/pages/gemeente/[code]/sterfte.tsx index aea28b6ba3..9e635beade 100644 --- a/packages/app/src/pages/gemeente/[code]/sterfte.tsx +++ b/packages/app/src/pages/gemeente/[code]/sterfte.tsx @@ -7,7 +7,7 @@ import { InView } from '~/components/in-view'; import { KpiTile } from '~/components/kpi-tile'; import { KpiValue } from '~/components/kpi-value'; import { Markdown } from '~/components/markdown'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx index bcdb40608d..7e3da871b4 100644 --- a/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx +++ b/packages/app/src/pages/gemeente/[code]/vaccinaties.tsx @@ -6,7 +6,7 @@ import { isDefined, isPresent } from 'ts-is-present'; import { Divider } from '~/components/divider'; import { InView } from '~/components/in-view'; import { BorderedKpiSection } from '~/components/kpi/bordered-kpi-section'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/gemeente/[code]/ziekenhuis-opnames.tsx b/packages/app/src/pages/gemeente/[code]/ziekenhuis-opnames.tsx index a5881a1a89..6472c66a8e 100644 --- a/packages/app/src/pages/gemeente/[code]/ziekenhuis-opnames.tsx +++ b/packages/app/src/pages/gemeente/[code]/ziekenhuis-opnames.tsx @@ -10,7 +10,7 @@ import { thresholds } from '~/components/choropleth/logic/thresholds'; import { InView } from '~/components/in-view'; import { KpiTile } from '~/components/kpi-tile'; import { KpiValue } from '~/components/kpi-value'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/besmettelijke-mensen.tsx b/packages/app/src/pages/landelijk/besmettelijke-mensen.tsx index 6b29250f2e..1337c7b47a 100644 --- a/packages/app/src/pages/landelijk/besmettelijke-mensen.tsx +++ b/packages/app/src/pages/landelijk/besmettelijke-mensen.tsx @@ -3,7 +3,7 @@ import { Ziektegolf } from '@corona-dashboard/icons'; import { GetStaticPropsContext } from 'next'; import { ChartTile } from '~/components/chart-tile'; import { InView } from '~/components/in-view'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/gedrag.tsx b/packages/app/src/pages/landelijk/gedrag.tsx index b1862c2845..64f18eb648 100644 --- a/packages/app/src/pages/landelijk/gedrag.tsx +++ b/packages/app/src/pages/landelijk/gedrag.tsx @@ -24,7 +24,7 @@ import { ArticleParts, PagePartQueryResult } from '~/types/cms'; import { replaceVariablesInText } from '~/utils/replace-variables-in-text'; import { getLastInsertionDateOfPage } from '~/utils/get-last-insertion-date-of-page'; import { useDynamicLokalizeTexts } from '~/utils/cms/use-dynamic-lokalize-texts'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { getPageInformationHeaderContent } from '~/utils/get-page-information-header-content'; import { WarningTile } from '~/components/warning-tile'; diff --git a/packages/app/src/pages/landelijk/gehandicaptenzorg.tsx b/packages/app/src/pages/landelijk/gehandicaptenzorg.tsx index a6bdd94f12..d7a4a7d3d0 100644 --- a/packages/app/src/pages/landelijk/gehandicaptenzorg.tsx +++ b/packages/app/src/pages/landelijk/gehandicaptenzorg.tsx @@ -8,7 +8,7 @@ import { ChoroplethTile } from '~/components/choropleth-tile'; import { thresholds } from '~/components/choropleth/logic/thresholds'; import { Divider } from '~/components/divider'; import { InView } from '~/components/in-view'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/kwetsbare-groepen-70-plussers.tsx b/packages/app/src/pages/landelijk/kwetsbare-groepen-70-plussers.tsx index f6d90be204..e823cf05a8 100644 --- a/packages/app/src/pages/landelijk/kwetsbare-groepen-70-plussers.tsx +++ b/packages/app/src/pages/landelijk/kwetsbare-groepen-70-plussers.tsx @@ -13,7 +13,7 @@ import { KpiTile } from '~/components/kpi-tile'; import { KpiValue } from '~/components/kpi-value'; import { BorderedKpiSection } from '~/components/kpi/bordered-kpi-section'; import { Markdown } from '~/components/markdown'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/patienten-in-beeld.tsx b/packages/app/src/pages/landelijk/patienten-in-beeld.tsx index d5fbe9004a..0c413a82f7 100644 --- a/packages/app/src/pages/landelijk/patienten-in-beeld.tsx +++ b/packages/app/src/pages/landelijk/patienten-in-beeld.tsx @@ -8,7 +8,7 @@ import { DynamicChoropleth } from '~/components/choropleth'; import { ChoroplethTile } from '~/components/choropleth-tile'; import { thresholds } from '~/components/choropleth/logic/thresholds'; import { InView } from '~/components/in-view'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { SEOHead } from '~/components/seo-head'; diff --git a/packages/app/src/pages/landelijk/positief-geteste-mensen.tsx b/packages/app/src/pages/landelijk/positief-geteste-mensen.tsx index 4db982974d..c6a6098f33 100644 --- a/packages/app/src/pages/landelijk/positief-geteste-mensen.tsx +++ b/packages/app/src/pages/landelijk/positief-geteste-mensen.tsx @@ -10,7 +10,7 @@ import { ChoroplethTile } from '~/components/choropleth-tile'; import { thresholds } from '~/components/choropleth/logic/thresholds'; import { InView } from '~/components/in-view'; import { Markdown } from '~/components/markdown'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/reproductiegetal.tsx b/packages/app/src/pages/landelijk/reproductiegetal.tsx index e07feac2a8..1d89c6f1e0 100644 --- a/packages/app/src/pages/landelijk/reproductiegetal.tsx +++ b/packages/app/src/pages/landelijk/reproductiegetal.tsx @@ -4,7 +4,7 @@ import { GetStaticPropsContext } from 'next'; import { InView } from '~/components/in-view'; import { KpiWithIllustrationTile } from '~/components/kpi-with-illustration-tile'; import { Markdown } from '~/components/markdown'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { PageKpi } from '~/components/page-kpi'; diff --git a/packages/app/src/pages/landelijk/rioolwater.tsx b/packages/app/src/pages/landelijk/rioolwater.tsx index a569e3819b..3f5bf403ca 100644 --- a/packages/app/src/pages/landelijk/rioolwater.tsx +++ b/packages/app/src/pages/landelijk/rioolwater.tsx @@ -7,7 +7,7 @@ import { thresholds } from '~/components/choropleth/logic/thresholds'; import { InView } from '~/components/in-view'; import { KpiTile } from '~/components/kpi-tile'; import { KpiValue } from '~/components/kpi-value'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/sterfte.tsx b/packages/app/src/pages/landelijk/sterfte.tsx index 116feec458..3d0d35158c 100644 --- a/packages/app/src/pages/landelijk/sterfte.tsx +++ b/packages/app/src/pages/landelijk/sterfte.tsx @@ -10,7 +10,7 @@ import { InView } from '~/components/in-view'; import { KpiTile } from '~/components/kpi-tile'; import { KpiValue } from '~/components/kpi-value'; import { Markdown } from '~/components/markdown'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/testen.tsx b/packages/app/src/pages/landelijk/testen.tsx index 51d5e12509..cc8f82628a 100644 --- a/packages/app/src/pages/landelijk/testen.tsx +++ b/packages/app/src/pages/landelijk/testen.tsx @@ -4,7 +4,7 @@ import { GetStaticPropsContext } from 'next'; import { useState } from 'react'; import { ChartTile } from '~/components/chart-tile'; import { InView } from '~/components/in-view'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/thuiswonende-ouderen.tsx b/packages/app/src/pages/landelijk/thuiswonende-ouderen.tsx index ba1c111e2c..5372a43b2a 100644 --- a/packages/app/src/pages/landelijk/thuiswonende-ouderen.tsx +++ b/packages/app/src/pages/landelijk/thuiswonende-ouderen.tsx @@ -8,7 +8,7 @@ import { ChoroplethTile } from '~/components/choropleth-tile'; import { thresholds } from '~/components/choropleth/logic/thresholds'; import { Divider } from '~/components/divider'; import { InView } from '~/components/in-view'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/vaccinaties.tsx b/packages/app/src/pages/landelijk/vaccinaties.tsx index c745a54a56..c529fafe46 100644 --- a/packages/app/src/pages/landelijk/vaccinaties.tsx +++ b/packages/app/src/pages/landelijk/vaccinaties.tsx @@ -7,7 +7,7 @@ import { ChartTile } from '~/components/chart-tile'; import { Divider } from '~/components/divider'; import { InView } from '~/components/in-view'; import { BorderedKpiSection } from '~/components/kpi/bordered-kpi-section'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/varianten.tsx b/packages/app/src/pages/landelijk/varianten.tsx index 6f0be79767..7e35ebd86a 100644 --- a/packages/app/src/pages/landelijk/varianten.tsx +++ b/packages/app/src/pages/landelijk/varianten.tsx @@ -1,7 +1,7 @@ import { Varianten } from '@corona-dashboard/icons'; import { GetStaticPropsContext } from 'next'; import { InView } from '~/components/in-view'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { TileList } from '~/components/tile-list'; diff --git a/packages/app/src/pages/landelijk/ziekenhuizen-en-zorg.tsx b/packages/app/src/pages/landelijk/ziekenhuizen-en-zorg.tsx index c26d5e4f5a..9a1013e1cc 100644 --- a/packages/app/src/pages/landelijk/ziekenhuizen-en-zorg.tsx +++ b/packages/app/src/pages/landelijk/ziekenhuizen-en-zorg.tsx @@ -6,7 +6,7 @@ import { ChartTile } from '~/components/chart-tile'; import { ChartTileToggleItem } from '~/components/chart-tile-toggle'; import { InView } from '~/components/in-view'; import { BorderedKpiSection } from '~/components/kpi/bordered-kpi-section'; -import { PageArticlesTile } from '~/components/page-articles-tile'; +import { PageArticlesTile } from '~/components/articles/page-articles-tile'; import { PageFaqTile } from '~/components/page-faq-tile'; import { PageInformationBlock } from '~/components/page-information-block'; import { SEOHead } from '~/components/seo-head'; diff --git a/packages/app/src/queries/get-page-parts-query.ts b/packages/app/src/queries/get-page-parts-query.ts index 43ab3b3b9e..c145fb9018 100644 --- a/packages/app/src/queries/get-page-parts-query.ts +++ b/packages/app/src/queries/get-page-parts-query.ts @@ -10,8 +10,7 @@ export const getPagePartsQuery = (pageIdentifier: PageIdentifier) => { _type, pageDataKind, (_type == 'pageArticles') => { - // TODO: add updateDate field as introduced by COR-1601 - articles[]->{_id, title, slug, summary, intro, "cover": {"asset": cover.asset->}, mainCategory[0], publicationDate}, + articles[]->{_id, title, slug, summary, intro, "cover": {"asset": cover.asset->}, mainCategory[0], publicationDate, updatedDate}, sectionTitle }, (_type == 'pageFAQs') => {