This commit is contained in:
2024-05-14 03:30:42 +02:00
parent c91ca959f6
commit 3f1a396975
10 changed files with 161 additions and 35 deletions

View File

@ -18,8 +18,6 @@ export default class extends AbstractView {
const games = await this.profile.getGameHistory();
console.log(games)
await this.fillHistory(games);
await this.fillStatistics(games);
@ -80,10 +78,10 @@ export default class extends AbstractView {
*/
async fillStatistics(games)
{
const winrateDiv = document.getElementById("winrate");
let winrateDiv = document.getElementById("winrate");
const win = 0;
const lose = 0;
let win = 0;
let lose = 0;
games.forEach(game => {
if (game.finished === false)
@ -100,7 +98,7 @@ export default class extends AbstractView {
async fillHistory(games)
{
const game_list = document.getElementById("game-list");
let game_list = document.getElementById("game-list");
games.forEach(game => {