Skip to content

Commit

Permalink
Title
Browse files Browse the repository at this point in the history
  • Loading branch information
RunarVestmann committed Jan 9, 2025
1 parent cf75073 commit d414970
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,13 @@ export const OverviewLinksSlice: React.FC<
>
<GridContainer>
{slice.hasBorderAbove && <BorderAbove />}
{cardView && <CardView slice={slice} />}
{!cardView && <ImageView slice={slice} />}
<Stack space={3}>
{Boolean(slice.titleAbove) && (
<Text variant="h3">{slice.titleAbove}</Text>
)}
{cardView && <CardView slice={slice} />}
{!cardView && <ImageView slice={slice} />}
</Stack>
</GridContainer>
</section>
)
Expand Down
1 change: 1 addition & 0 deletions apps/web/screens/queries/fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ export const slices = gql`
fragment OverviewLinksField on OverviewLinks {
__typename
id
titleAbove
hasBorderAbove
cardLinks {
title
Expand Down
4 changes: 4 additions & 0 deletions libs/cms/src/lib/models/overviewLinks.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export class OverviewLinks {
@Field(() => ID)
id!: string

@Field({ nullable: true })
titleAbove?: string

@CacheField(() => [IntroLinkImage])
overviewLinks!: Array<IntroLinkImage>

Expand All @@ -42,6 +45,7 @@ export const mapOverviewLinks = ({
}: IOverviewLinks): SystemMetadata<OverviewLinks> => ({
typename: 'OverviewLinks',
id: sys.id,
title: fields.displayedTitle ?? '',

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.

Check failure on line 48 in libs/cms/src/lib/models/overviewLinks.model.ts

View workflow job for this annotation

GitHub Actions / prepare

Object literal may only specify known properties, and 'title' does not exist in type 'SystemMetadata<OverviewLinks>'.
overviewLinks: (fields.overviewLinks ?? [])
.filter((link) => link.sys.contentType.sys.id === 'introLinkImage')
.map((link) => mapIntroLinkImage(link as IIntroLinkImage)),
Expand Down

0 comments on commit d414970

Please sign in to comment.