Skip to content

Commit

Permalink
feat(vth): add last updated
Browse files Browse the repository at this point in the history
  • Loading branch information
bddjong committed Oct 25, 2023
1 parent b85acef commit 2c1bae1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/vth-frontend/src/app/[locale]/poc/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Heading1, Heading2 } from '@utrecht/component-library-react';
import { Emphasis, Heading1, Heading2 } from '@utrecht/component-library-react';
import Image from 'next/image';
import React from 'react';
import { AccordionProvider, Markdown } from '@/components';
Expand All @@ -12,18 +12,21 @@ import { fetchData } from '@/util/fetchData';
type HomepageData = {
title: string;
content: string;
updatedAt: string;
bannerImage: { data: { attributes: { url: string } } };
};

type Thema = {
title: string;
content: any[];
updatedAt: string;
child_themas: ThemasResponse;
child_contents: ContentResponse;
};

type Content = {
title: string;
updatedAt: string;
content: any[];
};

Expand Down Expand Up @@ -56,6 +59,7 @@ const Page = async ({ params: { locale } }: { params: { locale: string } }) => {
<Heading1>
{indexString}. {thema.title}
</Heading1>
<Emphasis>Laatste wijziging: {thema.updatedAt}</Emphasis>
<DynamicContent content={thema.content} />
{thema.child_themas?.data[0] && (
<Grid className={'utrecht-grid--content-padding'}>
Expand Down Expand Up @@ -85,6 +89,7 @@ const Page = async ({ params: { locale } }: { params: { locale: string } }) => {
<Heading2>
{indexString}. {content.title}
</Heading2>
<Emphasis>Laatste wijziging: {content.updatedAt}</Emphasis>
<DynamicContent content={content.content} />
</div>
);
Expand Down
4 changes: 4 additions & 0 deletions apps/vth-frontend/src/query/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ query GET_PRINT_PAGE {
id
attributes {
title
updatedAt
content {
... on ComponentComponentsBlockContent {
__typename
Expand All @@ -247,6 +248,7 @@ query GET_PRINT_PAGE {
data {
attributes {
title
updatedAt
content {
... on ComponentComponentsBlockContent {
__typename
Expand All @@ -265,6 +267,7 @@ query GET_PRINT_PAGE {
data {
attributes {
title
updatedAt
content {
... on ComponentComponentsBlockContent {
__typename
Expand All @@ -289,6 +292,7 @@ query GET_PRINT_PAGE {
data {
attributes {
title
updatedAt
content {
... on ComponentComponentsBlockContent {
__typename
Expand Down

0 comments on commit 2c1bae1

Please sign in to comment.