Fix SOO button sorting
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
ef161bbb31
commit
af983c76b8
1 changed files with 4 additions and 1 deletions
|
@ -54,7 +54,10 @@ function SSOButtons({ homeserver }) {
|
||||||
<div className="sso-buttons__container">
|
<div className="sso-buttons__container">
|
||||||
{identityProviders
|
{identityProviders
|
||||||
// Sort by alphabetical order
|
// 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) => (
|
.map((idp) => (
|
||||||
<SSOButton
|
<SSOButton
|
||||||
key={idp.id}
|
key={idp.id}
|
||||||
|
|
Loading…
Reference in a new issue