Skip to content

Commit

Permalink
fix(queries): map slug to internalLink for more section types
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiazom committed Aug 23, 2024
1 parent 6d03665 commit 0a6bcbb
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion studio/lib/queries/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,43 @@ const SECTIONS_FRAGMENT = groq`
}
}
}
}
},
_type == "article" => {
...,
link {
...,
linkType == "internal" => {
...,
"internalLink": internalLink->{
"_ref": slug.current
}
}
}
},
_type == "callout" => {
...,
link {
...,
linkType == "internal" => {
...,
"internalLink": internalLink->{
"_ref": slug.current
}
}
}
},
_type == "ctaSection" => {
...,
callToActions[] {
...,
linkType == "internal" => {
...,
"internalLink": internalLink->{
"_ref": slug.current
}
}
}
},
}
`;

Expand Down

0 comments on commit 0a6bcbb

Please sign in to comment.