Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
delete indexjs and create appjs for prerender
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Campolo committed Sep 2, 2021
1 parent 8d53c6b commit 848fa6d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 37 deletions.
30 changes: 30 additions & 0 deletions web/src/App.js
@@ -0,0 +1,30 @@
import { AuthProvider } from '@redwoodjs/auth'
import { createClient } from '@supabase/supabase-js'

import { FatalErrorBoundary, RedwoodProvider } from '@redwoodjs/web'
import { RedwoodApolloProvider } from '@redwoodjs/web/apollo'

import FatalErrorPage from 'src/pages/FatalErrorPage'
import Routes from 'src/Routes'

import './scaffold.css'
import './index.css'

const supabaseClient = createClient(
process.env.SUPABASE_URL,
process.env.SUPABASE_KEY
)

const App = () => (
<FatalErrorBoundary page={FatalErrorPage}>
<RedwoodProvider titleTemplate="%PageTitle | %AppTitle">
<AuthProvider client={supabaseClient} type="supabase">
<RedwoodApolloProvider>
<Routes />
</RedwoodApolloProvider>
</AuthProvider>
</RedwoodProvider>
</FatalErrorBoundary>
)

export default App
23 changes: 14 additions & 9 deletions web/src/index.html
@@ -1,12 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="/favicon.png" />
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<div id="redwood-app"></div>
</body>

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="/favicon.png" />
</head>

<body>
<div id="redwood-app">
<!-- Please keep the line below for prerender support. -->
<%= prerenderPlaceholder %>
</div>
</body>

</html>
28 changes: 0 additions & 28 deletions web/src/index.js

This file was deleted.

0 comments on commit 848fa6d

Please sign in to comment.