Fix state resetting and button display
This commit is contained in:
parent
e64f6ec709
commit
7985fb1337
10
src/main.js
10
src/main.js
|
@ -10,13 +10,19 @@ const defaultState = {
|
|||
|
||||
var state = defaultState
|
||||
|
||||
function clearState() {
|
||||
|
||||
state = JSON.parse(JSON.stringify(defaultState))
|
||||
|
||||
}
|
||||
|
||||
|
||||
function changeView(view) {
|
||||
|
||||
for (el of document.querySelectorAll('.view'))
|
||||
el.style.display = 'none'
|
||||
|
||||
document.getElementById(view).style.display = 'block'
|
||||
document.getElementById(view).style.display = 'inline-block'
|
||||
|
||||
}
|
||||
|
||||
|
@ -233,7 +239,7 @@ function createQuiz() {
|
|||
|
||||
console.log('Creating new quiz')
|
||||
|
||||
state = defaultState
|
||||
clearState()
|
||||
removeLink()
|
||||
|
||||
if (parseSpreadsheet().success == false)
|
||||
|
|
Loading…
Reference in New Issue