Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
Rebuilderd Website
Commits
87c7557c
Verified
Commit
87c7557c
authored
Jul 05, 2020
by
Jelle van der Waa
🚧
Browse files
Use a custom sort implementation for suite ordering
Order the repository's so core/extraa is ordered before [community]
parent
28e918c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/App.js
View file @
87c7557c
...
...
@@ -25,6 +25,14 @@ class App extends React.Component {
);
}
compareSuites
(
element
)
{
if
(
element
.
name
==
'
core
'
||
element
.
name
==
'
extra
'
)
{
return
-
1
;
}
else
{
return
1
;
}
}
componentDidMount
()
{
const
url
=
'
/api/v0/pkgs/list
'
;
...
...
@@ -47,10 +55,12 @@ class App extends React.Component {
const
suiteList
=
[];
for
(
let
repo
of
Object
.
keys
(
suites
)
.
sort
()
)
{
for
(
let
repo
of
Object
.
keys
(
suites
))
{
suiteList
.
push
({
name
:
repo
,
pkgs
:
suites
[
repo
]});
}
suiteList
.
sort
(
this
.
compareSuites
);
this
.
setState
({
suites
:
suiteList
});
}).
catch
((
error
)
=>
{
console
.
log
(
error
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment