Made the score reset when leaving and going into a level
This commit is contained in:
parent
743e0db093
commit
5879743c6e
@ -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,5 +1,4 @@
|
|||||||
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';
|
||||||
import ScoreStats from '../components/ScoreStats';
|
import ScoreStats from '../components/ScoreStats';
|
||||||
|
Reference in New Issue
Block a user