|
|
@ -1,7 +1,7 @@ |
|
|
|
import * as ScorebarActions from '../../actions/board/scorebar.actions'; |
|
|
|
import * as ScorebarActions from '../../actions/board/scorebar.actions'; |
|
|
|
import SETTINGS from '../../AppSettings'; |
|
|
|
import SETTINGS from '../../AppSettings'; |
|
|
|
|
|
|
|
|
|
|
|
const stored = localStorage.getItem(SETTINGS.LOCAL_STORAGE_KEY) || [{ score: 0 }]; |
|
|
|
const stored = JSON.parse(localStorage.getItem(SETTINGS.LOCAL_STORAGE_KEY)) || [{ score: 0 }]; |
|
|
|
|
|
|
|
|
|
|
|
let dispatch; |
|
|
|
let dispatch; |
|
|
|
let lives = SETTINGS.LIVES; |
|
|
|
let lives = SETTINGS.LIVES; |
|
|
@ -27,6 +27,7 @@ const ScorebarCtrl = { |
|
|
|
highScore = previousHighScore; |
|
|
|
highScore = previousHighScore; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(ScorebarActions.update(lives, currentScore, highScore)); |
|
|
|
dispatch(ScorebarActions.update(lives, currentScore, highScore)); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|