upgrade and code mods v0.26 and v0.27
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
import { AuthProvider } from '@redwoodjs/auth'
|
||||
import netlifyIdentity from 'netlify-identity-widget'
|
||||
import ReactDOM from 'react-dom'
|
||||
import { FatalErrorBoundary } from '@redwoodjs/web'
|
||||
import { RedwoodApolloProvider } from '@redwoodjs/web/apollo'
|
||||
import FatalErrorPage from 'src/pages/FatalErrorPage'
|
||||
import { isBrowser } from '@redwoodjs/prerender/browserUtils'
|
||||
|
||||
import Routes from 'src/Routes'
|
||||
|
||||
import './scaffold.css'
|
||||
import './index.css'
|
||||
|
||||
netlifyIdentity.init()
|
||||
isBrowser && netlifyIdentity.init()
|
||||
|
||||
ReactDOM.render(
|
||||
const App = () => (
|
||||
<FatalErrorBoundary page={FatalErrorPage}>
|
||||
<AuthProvider client={netlifyIdentity} type="netlify">
|
||||
<RedwoodApolloProvider>
|
||||
<Routes />
|
||||
</RedwoodApolloProvider>
|
||||
</AuthProvider>
|
||||
</FatalErrorBoundary>,
|
||||
document.getElementById('redwood-app')
|
||||
</FatalErrorBoundary>
|
||||
)
|
||||
|
||||
export default App
|
||||
@@ -22,7 +22,7 @@ const Routes = () => {
|
||||
<Route path="/admin/posts/{id:Int}" page={PostPage} name="post" />
|
||||
<Route path="/admin/posts" page={PostsPage} name="posts" />
|
||||
</Private>
|
||||
<Route notfound page={NotFoundPage} />
|
||||
<Route notfound page={NotFoundPage} prerender />
|
||||
</Router>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body class="h-full bg-gray-200">
|
||||
<div id="redwood-app"></div>
|
||||
<div id="redwood-app">
|
||||
<%= prerenderPlaceholder %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user