Made the score reset when leaving and going into a level

This commit is contained in:
Liam 2022-02-15 19:29:59 +00:00
parent 743e0db093
commit 5879743c6e
2 changed files with 4 additions and 3 deletions

@ -1,4 +1,4 @@
import {Component, useState} from "react"; import {Component} from "react";
export default class ScoreStats extends Component { export default class ScoreStats extends Component {
@ -99,6 +99,7 @@ export default class ScoreStats extends Component {
"averagePreSwing": [70.00], "averagePreSwing": [70.00],
"averagePostSwing": [30.00], "averagePostSwing": [30.00],
}, },
score: 0,
isVisible: false isVisible: false
}); });
}, },
@ -115,6 +116,7 @@ export default class ScoreStats extends Component {
"averagePreSwing": [70.00], "averagePreSwing": [70.00],
"averagePostSwing": [30.00], "averagePostSwing": [30.00],
}, },
score: 0,
isVisible: true isVisible: true
}); });
}, },

@ -1,4 +1,3 @@
import Head from 'next/head'
import {Component} from 'react' import {Component} from 'react'
import Avatar from '../components/Avatar'; import Avatar from '../components/Avatar';
import PlayerStats from '../components/PlayerStats'; import PlayerStats from '../components/PlayerStats';