update proof from editor

v4.6.0-bump
Jon Eugster 2 years ago
parent 6472ef5b31
commit 6aebb8993f

@ -254,7 +254,7 @@ function useIsProcessingAt(p: DocumentPosition): boolean {
function InfoAux(props: InfoProps) { function InfoAux(props: InfoProps) {
const proofContext = React.useContext(ProofContext) const { setProof } = React.useContext(ProofContext)
const config = React.useContext(ConfigContext) const config = React.useContext(ConfigContext)
@ -420,6 +420,11 @@ function InfoAux(props: InfoProps) {
// hintContext.setHints(state.value.goals.goals[0].hints) // hintContext.setHints(state.value.goals.goals[0].hints)
// } // }
setDisplayProps({ ...state.value, triggerUpdate }) setDisplayProps({ ...state.value, triggerUpdate })
// Update the game's proof state
console.info('updating proof from editor mode.')
setProof(state.value.proof)
} else if (state.state === 'rejected' && state.error !== 'retry') { } else if (state.state === 'rejected' && state.error !== 'retry') {
// The code inside `useAsyncWithTrigger` may only ever reject with a `retry` exception. // The code inside `useAsyncWithTrigger` may only ever reject with a `retry` exception.
console.warn('Unreachable code reached with error: ', state.error) console.warn('Unreachable code reached with error: ', state.error)

Loading…
Cancel
Save