mirror of
https://github.com/FranP-code/Hangman-game-with-React.git
synced 2025-10-13 00:42:32 +00:00
Counter logic done
This commit is contained in:
@@ -4,7 +4,8 @@ const Victory = ({currentScore, setCurrentScore}) => {
|
||||
|
||||
React.useEffect(() => {
|
||||
|
||||
setCurrentScore(currentScore + 1)
|
||||
setCurrentScore(parseInt(currentScore) + 1)
|
||||
|
||||
}, [])
|
||||
|
||||
return (
|
||||
|
||||
6
src/components/Scripts/AlmacenateCurrentScore.js
Normal file
6
src/components/Scripts/AlmacenateCurrentScore.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const AlmacenateCurrentScore = (currentScore) => {
|
||||
|
||||
localStorage.setItem('currentScore', currentScore)
|
||||
}
|
||||
|
||||
export default AlmacenateCurrentScore
|
||||
Reference in New Issue
Block a user