Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scott/bug fixes #3187

Merged
merged 1 commit into from
Jan 21, 2025
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: 5 additions & 0 deletions src/queries/careerPathwaysPage.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { fragments } from "./commonQueries";

export const CAREER_PATHWAYS_PAGE_QUERY = `query Pathways {
page: careerPathwaysPage(id: "2bNH2ey6qkohbjnllmwSzg") {
sys {
Expand Down Expand Up @@ -29,4 +31,7 @@ export const CAREER_PATHWAYS_PAGE_QUERY = `query Pathways {
}
}
}
${fragments.pageBanner}
${fragments.iconCard}
${fragments.linkObject}
`;
99 changes: 99 additions & 0 deletions src/queries/commonQueries.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
export const richText = `json
links {
assets {
block {
sys {
id
}
url
title
description
width
height
contentType
}
}
}`;

export const navItems = `footerNav1: navMenus(id: "6QDRPQOaswzG5gHPgqoOkS") {
navItems
}
footerNav2: navMenus(id: "3WHbfXiLFSBXRC24QCq8H6") {
navItems
}
globalNav: navMenus(id: "7ARTjtRYG7ctcjPd1nbCHr") {
navItems
}
mainNav: navMenus(id: ${
process.env.REACT_APP_FEATURE_CAREER_PATHWAYS === "true"
? '"6z5HiOP5HqvJc07FURpT8Z"'
: '"3jcP5Uz9OY7syy4zu9Viul"'
}) {
navItems
}`;

export const metadata = `
title
pageDescription
keywords
ogImage {
sys {
id
}
url
title
width
height
fileName
contentType
}
`;

export const fragments = {
pageBanner: `fragment PageBanner on PageBanner {
title
section
breadcrumbsCollection(limit: 10) {
items {
sys {
id
}
copy
url
}
}
message {
json
}
ctaHeading
ctaLinksCollection(limit: 2) {
items {
sys {
id
}
copy
url
}
}
}`,
linkObject: `fragment LinkObject on LinkObject{
sys {
id
}
copy
screenReaderOnlyCopy
url
icon
customSvg
description
}`,
iconCard: `fragment IconCard on IconCard {
sys {
id
}
heading
icon
description
sectionIcon
}`,
};
75 changes: 75 additions & 0 deletions src/queries/fragments.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { richText } from "./commonQueries";

export const fragments = {
pageBanner: `fragment PageBanner on PageBanner {
title
section
breadcrumbsCollection {
items {
sys {
id
}
copy
url
}
}
message {
${richText}
}
ctaHeading
ctaLinksCollection {
items {
sys {
id
}
copy
url
}
}
}`,
linkObject: `fragment LinkObject on LinkObject{
sys {
id
}
copy
screenReaderOnlyCopy
url
icon
customSvg
description
}`,
iconCard: `fragment IconCard on IconCard {
sys {
id
}
title: heading
icon
description
sectionIcon
}`,
};

export const NavMenuFields = `
heading
url
topLevelItemsCollection {
items {
sys {
id
}
copy
screenReaderOnlyCopy
classes
url
subItemsCollection {
items {
sys {
id
}
copy
url
}
}
}
}
`;