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

Commit

Permalink
feat: Add new Sanity field for collection title (#4521)
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-ozaynaci authored Nov 30, 2022
1 parent 56cdee0 commit 288cd30
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
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

0 comments on commit 288cd30

Please sign in to comment.