Skip to content
Snippets Groups Projects
App.tsx 1.02 KiB
Newer Older
  • Learn to ignore specific revisions
  • /* eslint-disable @typescript-eslint/no-explicit-any */
    import React from 'react'
    import { HashRouter } from 'react-router-dom'
    import { createBrowserHistory } from 'history'
    import { Layout, Main, Content } from 'cozy-ui/transpiled/react/Layout'
    
    import Routes from 'components/Routes/Routes'
    import Navbar from 'components/Navbar/Navbar'
    import SplashRoot from './Splash/SplashRoot'
    import SplashScreen from 'components/Splash/SplashScreen'
    import SplashScreenError from 'components/Splash/SplashScreenError'
    
    export const history = createBrowserHistory()
    
    export const App = () => {
      return (
        <HashRouter {...history}>
          <Layout>
            <SplashRoot
              splashComponent={SplashScreen}
              splashErrorComponent={SplashScreenError}
            >
              <Navbar />
              <Main>
                <Content className="app-content" tabIndex="-1">
                  <Routes />
                </Content>
              </Main>
            </SplashRoot>
          </Layout>
        </HashRouter>
      )
    }
    
    export default App