mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-08 22:56:04 +02:00
Fix user avatar color order (#209)
This commit is contained in:
parent
58472e3a2d
commit
000d105983
1 changed files with 1 additions and 3 deletions
|
@ -46,9 +46,7 @@ export const UserAvatarProvider: React.VoidFunctionComponent<{
|
||||||
"": defaultColor,
|
"": defaultColor,
|
||||||
};
|
};
|
||||||
for (let i = 0; i < names.length; i++) {
|
for (let i = 0; i < names.length; i++) {
|
||||||
const lastIndex = names.length - 1;
|
const name = names[i].trim().toLowerCase();
|
||||||
// start from the end since the names is "most recent" first.
|
|
||||||
const name = names[lastIndex - i].trim().toLowerCase();
|
|
||||||
const color = colors[(seedValue + i) % colors.length];
|
const color = colors[(seedValue + i) % colors.length];
|
||||||
res[name] = color;
|
res[name] = color;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue