Add website ordering to state and settings page

This commit is contained in:
Chris Walsh committed 2022-07-23 23:01:59 -07:00
1 parent 70c6211e2c
commit 3926d3fe93
3 files changed
+46 -2

No files matched your search

+11
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;
}