Skip to content

Commit

Permalink
Merge pull request #337 from Shinsina/arthur-ashe-winners
Browse files Browse the repository at this point in the history
Re-order columns of Arthur Ashe Awards
  • Loading branch information
Shinsina authored May 10, 2024
2 parents 4ed4e4f + 3f75f5a commit 570aed0
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@ $ const { alias } = input;
params={ alias, queryFragment: sectionWithChilderenFragment }
>
$ const awards = getAsArray(node, "children.edges").map(({ node }) => node);
$ const awardsAppropriatelyOrdered = awards.reduce((array, award) => {
const innerArray = array;
if (award.name.match("Male Sport Winner")) {
innerArray[0] = award;
} else if (award.name.match("Female Sport Winner")) {
innerArray[1] = award;
} else if (award.name.match("Male Sport Finalists")) {
innerArray[2] = award;
} else if (award.name.match("Female Sport Finalists")) {
innerArray[3] = award;
}
return innerArray;
}, []);
<div class="row">
<for|award| of=awards>
<for|award| of=awardsAppropriatelyOrdered>
<marko-web-query|{ nodes }|
name="website-scheduled-content"
params={
Expand Down

0 comments on commit 570aed0

Please sign in to comment.