We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bedbbc1 commit 56b6f84Copy full SHA for 56b6f84
src/pages/main/goals.js
@@ -65,6 +65,7 @@ const Goals = () => {
65
query {
66
allGoalsYaml {
67
nodes {
68
+ id
69
title
70
description
71
goals {
@@ -89,6 +90,7 @@ const Goals = () => {
89
90
`
91
)
92
93
+ const sortedCategories = data.allGoalsYaml.nodes.sort((a, b) => a.id - b.id);
94
const allGoals = data.allGoalsYaml.nodes.map(node => node.goals);
95
const goalsConcat = [].concat(...allGoals);
96
@@ -153,7 +155,7 @@ const Goals = () => {
153
155
<p></p>
154
156
</div>
157
<p style={placeholderTop}> </p>
- {data.allGoalsYaml.nodes.map((category) => (
158
+ {sortedCategories.map((category) => (
159
<GoalCategory
160
array={category.goals}
161
name={category.title}
0 commit comments