Clean state when New button is pressed

This commit is contained in:
Justin Edmund 2022-02-23 14:52:44 -08:00
parent bbe78566ad
commit 514ed28cfc

View file

@ -42,7 +42,14 @@ const TopHeader = () => {
}
function newParty() {
// Push the root URL
router.push('/')
// Clean state
const resetState = clonedeep(initialAppState)
Object.keys(resetState).forEach((key) => {
appState[key] = resetState[key]
})
}
function logout() {