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 232bf00 commit 04cb253Copy full SHA for 04cb253
src/components/Site/Site.jsx
@@ -43,18 +43,17 @@ const Site = ({
43
.map((section) => ({
44
title: section.path.title,
45
url: section.url,
46
- pages: section.pages.map(page => ({
47
- file: page.file,
48
- title: page.file.title,
49
- url: page.url
50
- })).sort(({ file: { attributes: a }}, { file: { attributes: b }}) => {
+ pages: section.pages.slice().sort(({ file: { attributes: a }}, { file: { attributes: b }}) => {
51
let group1 = a.group.toLowerCase();
52
let group2 = b.group.toLowerCase();
53
54
if (group1 < group2) return -1;
55
if (group1 > group2) return 1;
56
return a.sort - b.sort;
57
- })
+ }).map(page => ({
+ title: page.file.title,
+ url: page.url
+ }))
58
}))
59
} />
60
0 commit comments