Dynamically import netlifyIdentity
This commit is contained in:
parent
7a6d9dd223
commit
522b9a694d
3 changed files with 4 additions and 2 deletions
|
|
@ -19,6 +19,7 @@ export const siteTitle = 'HyperStatic'
|
|||
class App extends Component {
|
||||
componentWillMount () {
|
||||
globalStyles()
|
||||
import('./netlifyIdentity')
|
||||
}
|
||||
|
||||
render () {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import React from 'react'
|
|||
import { render } from 'react-snapshot'
|
||||
import App from './App'
|
||||
import registerServiceWorker from './registerServiceWorker'
|
||||
import './netlifyIdentity'
|
||||
|
||||
const rootEl = document.getElementById('root')
|
||||
render(<App />, rootEl)
|
||||
|
|
|
|||
|
|
@ -9,4 +9,6 @@ netlifyIdentity.on('init', user => {
|
|||
}
|
||||
})
|
||||
|
||||
netlifyIdentity.init()
|
||||
if (window.localStorage) {
|
||||
netlifyIdentity.init()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue