Skip to content

Commit f33d494

Browse files
Merge branch 'master' into fix/remove-button-alt-attribute
2 parents 79f7a66 + 32697b3 commit f33d494

File tree

1 file changed

+132
-123
lines changed

1 file changed

+132
-123
lines changed

src/sections/General/Navigation/index.js

Lines changed: 132 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -25,135 +25,144 @@ import Layer5CloudLightIcon from "./utility/Layer5CloudLightIcon.svg";
2525
import { IoIosArrowRoundForward } from "@react-icons/all-files/io/IoIosArrowRoundForward.js";
2626

2727
const Navigation = () => {
28-
let data = useStaticQuery(
29-
graphql`{
30-
Learn: allMdx(
31-
sort: {frontmatter: {date: DESC}}
32-
filter: {fields: {collection: {eq: "service-mesh-books"}}}
33-
limit: 2
34-
) {
35-
nodes {
36-
id
37-
frontmatter {
38-
title
39-
thumbnail {
40-
childImageSharp {
41-
gatsbyImageData(width: 1050, height: 1360, layout: CONSTRAINED)
28+
let data = useStaticQuery(graphql`
29+
{
30+
Learn: allMdx(
31+
sort: { frontmatter: { date: DESC } }
32+
filter: { fields: { collection: { eq: "service-mesh-books" } } }
33+
limit: 2
34+
) {
35+
nodes {
36+
id
37+
frontmatter {
38+
title
39+
thumbnail {
40+
childImageSharp {
41+
gatsbyImageData(width: 1050, height: 1360, layout: CONSTRAINED)
42+
}
43+
}
44+
thumbnail_svg {
45+
extension
46+
publicURL
47+
}
4248
}
43-
}
44-
thumbnail_svg {
45-
extension
46-
publicURL
47-
}
48-
}
49-
fields {
50-
slug
51-
}
52-
}
53-
}
54-
Community: allMdx(
55-
sort: {frontmatter: {date: DESC}}
56-
filter: {fields: {collection: {eq: "events"}}, frontmatter: {published: {eq: true}}}
57-
limit: 2
58-
) {
59-
nodes {
60-
id
61-
frontmatter {
62-
title
63-
thumbnail {
64-
childImageSharp {
65-
gatsbyImageData(
66-
width: 240
67-
height: 160
68-
transformOptions: {cropFocus: CENTER}
69-
layout: FIXED
70-
)
49+
fields {
50+
slug
7151
}
72-
publicURL
73-
extension
74-
}
75-
thumbnail_svg {
76-
extension
77-
publicURL
7852
}
79-
thumbnail_svg {
80-
extension
81-
publicURL
82-
}
83-
}
84-
fields {
85-
slug
8653
}
87-
}
88-
}
89-
Resources: allMdx(
90-
sort: {frontmatter: {date: DESC}}
91-
filter: {fields: {collection: {eq: "blog"}}, frontmatter: {featured: {eq: true}}}
92-
limit: 2
93-
) {
94-
nodes {
95-
id
96-
frontmatter {
97-
title
98-
thumbnail {
99-
childImageSharp {
100-
gatsbyImageData(
101-
width: 240
102-
height: 160
103-
transformOptions: {cropFocus: CENTER}
104-
layout: FIXED
105-
)
54+
Community: allMdx(
55+
sort: { frontmatter: { date: DESC } }
56+
filter: {
57+
fields: { collection: { eq: "events" } }
58+
frontmatter: { published: { eq: true } }
59+
}
60+
limit: 2
61+
) {
62+
nodes {
63+
id
64+
frontmatter {
65+
title
66+
thumbnail {
67+
childImageSharp {
68+
gatsbyImageData(
69+
width: 240
70+
height: 160
71+
transformOptions: { cropFocus: CENTER }
72+
layout: FIXED
73+
)
74+
}
75+
publicURL
76+
extension
77+
}
78+
thumbnail_svg {
79+
extension
80+
publicURL
81+
}
82+
thumbnail_svg {
83+
extension
84+
publicURL
85+
}
86+
}
87+
fields {
88+
slug
10689
}
107-
publicURL
108-
extension
10990
}
110-
thumbnail_svg {
111-
extension
112-
publicURL
91+
}
92+
Resources: allMdx(
93+
sort: { frontmatter: { date: DESC } }
94+
filter: {
95+
fields: { collection: { eq: "blog" } }
96+
frontmatter: { featured: { eq: true } }
11397
}
114-
thumbnail_svg {
115-
extension
116-
publicURL
98+
limit: 2
99+
) {
100+
nodes {
101+
id
102+
frontmatter {
103+
title
104+
thumbnail {
105+
childImageSharp {
106+
gatsbyImageData(
107+
width: 240
108+
height: 160
109+
transformOptions: { cropFocus: CENTER }
110+
layout: FIXED
111+
)
112+
}
113+
publicURL
114+
extension
115+
}
116+
thumbnail_svg {
117+
extension
118+
publicURL
119+
}
120+
thumbnail_svg {
121+
extension
122+
publicURL
123+
}
124+
}
125+
fields {
126+
slug
127+
}
117128
}
118129
}
119-
fields {
120-
slug
121-
}
122-
}
123-
}
124-
Home: allMdx(
125-
sort: {frontmatter: {date: DESC}}
126-
filter: {fields: {collection: {eq: "projects"}}, frontmatter: {published: {eq: true}}}
127-
limit: 2
128-
) {
129-
nodes {
130-
id
131-
frontmatter {
132-
title
133-
thumbnail {
134-
childImageSharp {
135-
gatsbyImageData(
136-
width: 240
137-
height: 160
138-
transformOptions: {cropFocus: CENTER}
139-
layout: FIXED
140-
)
141-
}
142-
extension
143-
publicURL
130+
Home: allMdx(
131+
sort: { frontmatter: { date: DESC } }
132+
filter: {
133+
fields: { collection: { eq: "projects" } }
134+
frontmatter: { published: { eq: true } }
144135
}
145-
thumbnail_svg {
146-
extension
147-
publicURL
136+
limit: 2
137+
) {
138+
nodes {
139+
id
140+
frontmatter {
141+
title
142+
thumbnail {
143+
childImageSharp {
144+
gatsbyImageData(
145+
width: 240
146+
height: 160
147+
transformOptions: { cropFocus: CENTER }
148+
layout: FIXED
149+
)
150+
}
151+
extension
152+
publicURL
153+
}
154+
thumbnail_svg {
155+
extension
156+
publicURL
157+
}
158+
}
159+
fields {
160+
slug
161+
}
148162
}
149163
}
150-
fields {
151-
slug
152-
}
153164
}
154-
}
155-
}`
156-
);
165+
`);
157166
const { isDark, toggleDark } = useStyledDarkMode();
158167
data["Products"] = {
159168
nodes: [
@@ -210,12 +219,12 @@ const Navigation = () => {
210219
cookieName + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
211220
}
212221
useEffect(() => {
213-
const CLOUD_USER_API =
214-
"https://cloud.layer5.io/api/identity/users/profile";
222+
const CLOUD_USER_API = "https://cloud.layer5.io/api/identity/users/profile";
215223
const fetchData = async () => {
216224
try {
217225
const token = getCookieValue("provider_token");
218-
if (!token) { // no token: don't proceed
226+
if (!token) {
227+
// no token: don't proceed
219228
return;
220229
}
221230
const response = await axios.get(CLOUD_USER_API, {
@@ -254,7 +263,8 @@ const Navigation = () => {
254263
}
255264
};
256265

257-
expand && setTimeout(() => document.addEventListener("click", outsideClickHandler));
266+
expand &&
267+
setTimeout(() => document.addEventListener("click", outsideClickHandler));
258268

259269
return () => {
260270
document.removeEventListener("click", outsideClickHandler);
@@ -263,7 +273,7 @@ const Navigation = () => {
263273

264274
useEffect(() => {
265275
window.addEventListener("scroll", () =>
266-
window.scrollY > 50 ? setScroll(true) : setScroll(false)
276+
window.scrollY > 50 ? setScroll(true) : setScroll(false),
267277
);
268278
}, []);
269279

@@ -413,7 +423,7 @@ const Navigation = () => {
413423
<IoIosArrowRoundForward />
414424
</span>
415425
</Link>
416-
)
426+
),
417427
)}
418428
</ul>
419429
</li>
@@ -533,7 +543,6 @@ const Navigation = () => {
533543
className="banner-btn two"
534544
$external={true}
535545
title="Get Started"
536-
alt="Signup for Layer5 Cloud"
537546
$url="https://cloud.layer5.io/registration"
538547
/>
539548
)}

0 commit comments

Comments
 (0)