Refactor armoire content to be cached by day

This commit is contained in:
Phillip Thelen
2024-05-15 16:51:09 +02:00
parent 46d164ddd1
commit 4d38880249
17 changed files with 198 additions and 97 deletions

View File

@@ -49,16 +49,17 @@ export function mountMasterProgress (mounts = {}) {
export function remainingGearInSet (userGear = {}, set) {
const gear = filter(content.gear.flat, item => {
const setMatches = item.klass === set;
if (item.klass !== set) {
return false;
}
const hasItem = userGear[item.key];
if (has(item, 'released')) {
return item.released && setMatches && !hasItem;
return item.released && !hasItem;
}
return setMatches && !hasItem;
return !hasItem;
});
const count = size(gear);
return count;
}