From 36b92011283c6776d408e37cb40f2bfd4adf0c74 Mon Sep 17 00:00:00 2001 From: M <120020483+VWSCoronaDashboard30@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:41:57 +0100 Subject: [PATCH] feature(COR-1874): Corrected Articles, Over, Toegankelijkheid, Veelgestelde-vragen pages --- packages/app/src/domain/layout/layout.tsx | 10 ++-- packages/app/src/pages/artikelen/index.tsx | 30 +++++----- packages/app/src/pages/over.tsx | 19 ++++--- packages/app/src/pages/toegankelijkheid.tsx | 57 ++++++------------- .../app/src/pages/veelgestelde-vragen.tsx | 43 +++++++------- 5 files changed, 70 insertions(+), 89 deletions(-) diff --git a/packages/app/src/domain/layout/layout.tsx b/packages/app/src/domain/layout/layout.tsx index 3551d17395..d84fb1747c 100644 --- a/packages/app/src/domain/layout/layout.tsx +++ b/packages/app/src/domain/layout/layout.tsx @@ -1,14 +1,14 @@ -import { ReactNode } from 'react'; +import { AppFooter } from '~/components/layout/app-footer'; +import { AppHeader } from '~/components/layout/app-header'; import { Box } from '~/components/base/box'; import { Breadcrumbs } from '~/components/breadcrumbs'; import { BreadcrumbsDataProvider } from '~/components/breadcrumbs/logic/use-breadcrumbs'; -import { AppFooter } from '~/components/layout/app-footer'; -import { AppHeader } from '~/components/layout/app-header'; +import { CurrentDateProvider } from '~/utils/current-date-context'; import { NotificationBanner } from '~/components/notification-banner'; +import { ReactNode } from 'react'; import { SEOHead } from '~/components/seo-head'; import { SkipLinkMenu } from '~/components/skip-link-menu'; import { useIntl } from '~/intl'; -import { CurrentDateProvider } from '~/utils/current-date-context'; interface LayoutProps { children: ReactNode; @@ -30,12 +30,12 @@ export function Layout({ breadcrumbsData, children, title, description, openGrap ({ textShared: siteText.pages.topical_page.shared, @@ -99,7 +99,7 @@ const Articles = (props: StaticProps) => { return ( - + diff --git a/packages/app/src/pages/over.tsx b/packages/app/src/pages/over.tsx index 7c48cc01d8..23964aef90 100644 --- a/packages/app/src/pages/over.tsx +++ b/packages/app/src/pages/over.tsx @@ -1,17 +1,18 @@ -import Head from 'next/head'; -import styled from 'styled-components'; import { Box } from '~/components/base'; import { ContentImage } from '~/components/cms/content-image'; -import { RichContent } from '~/components/cms/rich-content'; +import { ContentLayout } from '~/domain/layout/content-layout'; +import { createGetContent, getLastGeneratedDate } from '~/static-props/get-data'; +import { createGetStaticProps, StaticProps } from '~/static-props/create-get-static-props'; import { FullscreenChartTile } from '~/components/fullscreen-chart-tile'; import { Heading } from '~/components/typography'; -import { ContentLayout } from '~/domain/layout/content-layout'; +import { ImageBlock, RichContentBlock } from '~/types/cms'; import { Layout } from '~/domain/layout/layout'; -import { useIntl } from '~/intl'; -import { createGetStaticProps, StaticProps } from '~/static-props/create-get-static-props'; -import { createGetContent, getLastGeneratedDate } from '~/static-props/get-data'; import { mediaQueries, sizes, space } from '~/style/theme'; -import { ImageBlock, RichContentBlock } from '~/types/cms'; +import { RichContent } from '~/components/cms/rich-content'; +import { useIntl } from '~/intl'; +import Head from 'next/head'; +import styled from 'styled-components'; + interface OverData { title: string | null; intro: RichContentBlock[]; @@ -66,7 +67,7 @@ const Over = (props: StaticProps) => { - + {content.title} diff --git a/packages/app/src/pages/toegankelijkheid.tsx b/packages/app/src/pages/toegankelijkheid.tsx index 6b5c081b44..9169558607 100644 --- a/packages/app/src/pages/toegankelijkheid.tsx +++ b/packages/app/src/pages/toegankelijkheid.tsx @@ -1,20 +1,15 @@ -import css from '@styled-system/css'; -import Head from 'next/head'; -import styled from 'styled-components'; -import { RichContent } from '~/components/cms/rich-content'; -import { Heading } from '~/components/typography'; +import { Box } from '~/components/base'; import { Content } from '~/domain/layout/content'; +import { createGetContent, getLastGeneratedDate } from '~/static-props/get-data'; +import { createGetStaticProps, StaticProps } from '~/static-props/create-get-static-props'; +import { Heading } from '~/components/typography'; import { Layout } from '~/domain/layout/layout'; -import { useIntl } from '~/intl'; -import { - createGetStaticProps, - StaticProps, -} from '~/static-props/create-get-static-props'; -import { - createGetContent, - getLastGeneratedDate, -} from '~/static-props/get-data'; +import { RichContent } from '~/components/cms/rich-content'; import { RichContentBlock } from '~/types/cms'; +import { useIntl } from '~/intl'; +import css from '@styled-system/css'; +import Head from 'next/head'; +import styled from 'styled-components'; interface AccessibilityPageData { title: string | null; @@ -52,33 +47,17 @@ const AccessibilityPage = (props: StaticProps) => { const { content, lastGenerated } = props; return ( - + - - + + - - - {content.title && {content.title}} - {content.description && ( - - )} - + + + {content.title && {content.title}} + {content.description && } + + ); }; diff --git a/packages/app/src/pages/veelgestelde-vragen.tsx b/packages/app/src/pages/veelgestelde-vragen.tsx index 331d3e25b2..3ea8793cb9 100644 --- a/packages/app/src/pages/veelgestelde-vragen.tsx +++ b/packages/app/src/pages/veelgestelde-vragen.tsx @@ -1,17 +1,17 @@ -import groupBy from 'lodash/groupBy'; -import Head from 'next/head'; -import styled from 'styled-components'; import { Box } from '~/components/base/box'; -import { RichContent } from '~/components/cms/rich-content'; +import { ContentLayout } from '~/domain/layout/content-layout'; +import { createGetContent, getLastGeneratedDate } from '~/static-props/get-data'; +import { createGetStaticProps, StaticProps } from '~/static-props/create-get-static-props'; import { FaqSection } from '~/components/faq/faq-section'; +import { FAQuestionAndAnswer, RichContentBlock } from '~/types/cms'; import { Heading } from '~/components/typography'; -import { ContentLayout } from '~/domain/layout/content-layout'; import { Layout } from '~/domain/layout/layout'; -import { useIntl } from '~/intl'; -import { createGetStaticProps, StaticProps } from '~/static-props/create-get-static-props'; -import { createGetContent, getLastGeneratedDate } from '~/static-props/get-data'; import { mediaQueries, sizes, space } from '~/style/theme'; -import { FAQuestionAndAnswer, RichContentBlock } from '~/types/cms'; +import { RichContent } from '~/components/cms/rich-content'; +import { useIntl } from '~/intl'; +import groupBy from 'lodash/groupBy'; +import Head from 'next/head'; +import styled from 'styled-components'; interface VeelgesteldeVragenData { title: string | null; @@ -74,20 +74,21 @@ const Verantwoording = (props: StaticProps) => { + + + {content.title && ( + + {content.title} + + )} + {content.description && } + - - {content.title && ( - - {content.title} - - )} - {content.description && } + + + + - - - - - );