projects
/
cinny.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef161bb
)
Fix SOO button sorting
author
Ajay Bura
<ajbura@gmail.com>
Thu, 28 Oct 2021 08:12:57 +0000
(13:42 +0530)
committer
Ajay Bura
<ajbura@gmail.com>
Thu, 28 Oct 2021 08:12:57 +0000
(13:42 +0530)
Signed-off-by: Ajay Bura <ajbura@gmail.com>
src/app/molecules/sso-buttons/SSOButtons.jsx
patch
|
blob
|
history
diff --git
a/src/app/molecules/sso-buttons/SSOButtons.jsx
b/src/app/molecules/sso-buttons/SSOButtons.jsx
index af6cb927acdf87972f9e4af9854c77d0f1962b6b..312a16501b5e817503e8feb16ae3cb39a35c2041 100644
(file)
--- a/
src/app/molecules/sso-buttons/SSOButtons.jsx
+++ b/
src/app/molecules/sso-buttons/SSOButtons.jsx
@@
-54,7
+54,10
@@
function SSOButtons({ homeserver }) {
<div className="sso-buttons__container">
{identityProviders
// Sort by alphabetical order
- .sort((idp, idp2) => !!idp.imageSrc && idp.name > idp2.name)
+ .sort((idp, idp2) => {
+ if (typeof idp.imageSrc !== 'string') return -1;
+ return idp.name.toLowerCase() > idp2.name.toLowerCase() ? 1 : -1;
+ })
.map((idp) => (
<SSOButton
key={idp.id}