Add website ordering to state and settings page

This commit is contained in:
Chris Walsh 2022-07-23 23:01:59 -07:00
parent 70c6211e2c
commit 3926d3fe93
No known key found for this signature in database
GPG key ID: 28EE0CCA6032019E
3 changed files with 46 additions and 2 deletions

View file

@ -78,3 +78,14 @@ export function stringToColor(str) {
}
return color;
}
export function orderByWebsiteMap(websites, orderMap) {
if (!websites) return [];
let ordered = [...websites];
for (let website of websites) {
ordered[orderMap[website.website_uuid]] = website;
}
return ordered;
}