Created
April 2, 2020 03:15
-
-
Save jsmanifest/c1e96f9adcb7bbdd48dc1c882d0f2460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Topbar from './Topbar' | |
import Sidebar from './Sidebar' | |
import About from './About' | |
import Contact from './Contact' | |
import PrivacyPolicy from './PrivacyPolicy' | |
import Dashboard from './Dashboard' | |
import { Router } from '@reach/router' | |
function App() { | |
return ( | |
<Router> | |
<Dashboard | |
topbar={({ authenticated }) => ( | |
<Router> | |
<Topbar path="*" authenticated={authenticated} /> | |
</Router> | |
)} | |
sidebar={() => ( | |
<Router> | |
<Sidebar path="*" /> | |
</Router> | |
)} | |
view={({ authenticated }) => ( | |
<Router> | |
<About path="/about" /> | |
<Contact path="/contact" /> | |
<PrivacyPolicy path="/privacy-policy" /> | |
<Admin path="/admin" authenticated={authenticated} /> | |
</Router> | |
)} | |
/> | |
</Router> | |
) | |
} | |
export default App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment