Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scwambach committed Jan 21, 2025
1 parent b7cd730 commit 1a83f9c
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 0 deletions.
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
}
}
}
}
`;

0 comments on commit 1a83f9c

Please sign in to comment.