Skip to content

Commit 7df9512

Browse files
author
Carms Ng
committed
[UPD] Team Member Query
1 parent ae77d39 commit 7df9512

File tree

1 file changed

+30
-32
lines changed

1 file changed

+30
-32
lines changed

Diff for: src/components/carousel.js

+30-32
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,45 @@ export default function Carousel({ teamIndex, setTeamIndex, locale }) {
66
// Query all team member info
77
const { content } = useStaticQuery(graphql`{
88
content: allContentJson(sort: {fields: en___image___base, order: ASC}) {
9-
group(field: parent___children) {
10-
nodes {
11-
en {
12-
name
13-
title
14-
linkedin
15-
image {
16-
childImageSharp {
17-
gatsbyImageData(
18-
width: 360,
19-
height: 500,
20-
placeholder: BLURRED,
21-
layout: CONSTRAINED
22-
)
23-
}
9+
nodes {
10+
en {
11+
name
12+
title
13+
linkedin
14+
image {
15+
childImageSharp {
16+
gatsbyImageData(
17+
width: 360,
18+
height: 500,
19+
placeholder: BLURRED,
20+
layout: CONSTRAINED
21+
)
2422
}
25-
highlights
26-
github
2723
}
28-
fr {
29-
name
30-
title
31-
linkedin
32-
image {
33-
childImageSharp {
34-
gatsbyImageData(
35-
width: 500,
36-
placeholder: BLURRED,
37-
layout: CONSTRAINED
38-
)
39-
}
24+
highlights
25+
github
26+
}
27+
fr {
28+
name
29+
title
30+
linkedin
31+
image {
32+
childImageSharp {
33+
gatsbyImageData(
34+
width: 500,
35+
placeholder: BLURRED,
36+
layout: CONSTRAINED
37+
)
4038
}
41-
highlights
42-
github
4339
}
40+
highlights
41+
github
4442
}
4543
}
4644
}
4745
}`);
4846

49-
const members = content.group[0].nodes
47+
const members = content.nodes
5048
const membersLocalized = members.map(member => member[locale])
5149

5250
return (

0 commit comments

Comments
 (0)