|
|
@ -20,13 +20,24 @@ class Index extends React.Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const { router } = this.props
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Page enableHeroText={true}>
|
|
|
|
<Page enableHeroText={true}>
|
|
|
|
<Editor {...router} onUpdate={this.onEditorUpdate} api={api} />
|
|
|
|
<Editor {...this.props.router} onUpdate={this.onEditorUpdate} api={api} onReset={onReset} />
|
|
|
|
</Page>
|
|
|
|
</Page>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function onReset() {
|
|
|
|
|
|
|
|
localStorage.clear()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (window.navigator && navigator.serviceWorker) {
|
|
|
|
|
|
|
|
navigator.serviceWorker.getRegistrations().then(registrations => {
|
|
|
|
|
|
|
|
for (let registration of registrations) {
|
|
|
|
|
|
|
|
registration.unregister()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default withRouter(Index)
|
|
|
|
export default withRouter(Index)
|
|
|
|