Rewrite dashboard with Vue

This commit is contained in:
2020-04-12 12:21:24 +03:00
parent 4dd11a60f7
commit 9d37697b13
13 changed files with 547 additions and 40 deletions

View File

@ -12,14 +12,18 @@ export function grabVillageList(): VillageList {
return villageList;
}
export function grabActiveVillageId(): number {
export function grabActiveVillage(): Village | undefined {
const villageList = grabVillageList();
for (let village of villageList) {
if (village.active) {
return village.id;
return village;
}
}
return 0;
return undefined;
}
export function grabActiveVillageId(): number {
return grabActiveVillage()?.id || 0;
}
function getVillageListItems() {