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

feat: Add new Sanity field for collection title #4521

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/app/src/pages/landelijk/geldende-adviezen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export const getStaticProps = createGetStaticProps(
}
},
'title':title.${locale},
'description': description.${locale}
'description': description.${locale},
'collectionTitle': collectionTitle.${locale}
},
}`;
})
Expand Down Expand Up @@ -70,7 +71,7 @@ const NationalRestrictions = (props: StaticProps<typeof getStaticProps>) => {
)}
</Box>
<Box as="article" spacing={3}>
<Heading level={3}>{measures.title}</Heading>
<Heading level={3}>{measures.collectionTitle}</Heading>
<MeasuresTable data={measures} />
</Box>
</TileList>
Expand Down
1 change: 1 addition & 0 deletions packages/app/src/types/cms.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export type Measures = {
icon: string;
title: string;
description: RichContentBlock[] | null;
collectionTitle: string;
measuresCollection: MeasuresCollection[];
};
declare module 'picosanity' {
Expand Down
6 changes: 6 additions & 0 deletions packages/cms/src/schemas/measures/measures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ export const measures = {
name: 'description',
type: 'localeRichContentBlock',
},
{
title: 'Titel van de groepen',
name: 'collectionTitle',
type: 'localeString',
validation: REQUIRED,
},
{
title: 'Groepen',
description: 'De maatregelen zijn onderverdeeld in groepen',
Expand Down