Clean state when New button is pressed
This commit is contained in:
parent
bbe78566ad
commit
514ed28cfc
1 changed files with 7 additions and 0 deletions
|
|
@ -42,7 +42,14 @@ const TopHeader = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function newParty() {
|
function newParty() {
|
||||||
|
// Push the root URL
|
||||||
router.push('/')
|
router.push('/')
|
||||||
|
|
||||||
|
// Clean state
|
||||||
|
const resetState = clonedeep(initialAppState)
|
||||||
|
Object.keys(resetState).forEach((key) => {
|
||||||
|
appState[key] = resetState[key]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue