correct sort submitters by adding lowercase
This commit is contained in:
parent
782627a920
commit
77870ab1a1
2
.env
2
.env
@ -1,3 +1,3 @@
|
|||||||
REACT_APP_KC_URL=https://auth-dev.csi.wmi.amu.edu.pl/
|
REACT_APP_KC_URL=https://auth-dev.csi.wmi.amu.edu.pl/
|
||||||
REACT_APP_KC_REALM=gonito-dev
|
REACT_APP_KC_REALM=gonito-dev
|
||||||
REACT_APP_KC_CLIENT_ID=gonito-dev-heroku
|
REACT_APP_KC_CLIENT_ID=gonito-dev-localhost
|
||||||
|
@ -90,10 +90,10 @@ const Leaderboard = (props) => {
|
|||||||
switch (elem) {
|
switch (elem) {
|
||||||
case 'submitter':
|
case 'submitter':
|
||||||
if (submitterSorted) {
|
if (submitterSorted) {
|
||||||
newEntries = newEntries.sort((a, b) => (a.submitter < b.submitter) ? 1 : ((b.submitter < a.submitter) ? -1 : 0));
|
newEntries = newEntries.sort((a, b) => (a.submitter.toLowerCase() < b.submitter.toLowerCase()) ? 1 : ((b.submitter.toLowerCase() < a.submitter.toLowerCase()) ? -1 : 0));
|
||||||
setSubmitterSorted(false);
|
setSubmitterSorted(false);
|
||||||
} else {
|
} else {
|
||||||
newEntries = newEntries.sort((a, b) => (a.submitter > b.submitter) ? 1 : ((b.submitter > a.submitter) ? -1 : 0));
|
newEntries = newEntries.sort((a, b) => (a.submitter.toLowerCase() > b.submitter.toLowerCase()) ? 1 : ((b.submitter.toLowerCase() > a.submitter.toLowerCase()) ? -1 : 0));
|
||||||
setSubmitterSorted(true);
|
setSubmitterSorted(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user