App.tsx 642 B
Newer Older
Andrei Eres's avatar
Andrei Eres committed
import React from 'react'
Andrei Eres's avatar
Andrei Eres committed
import { ErrorBoundary } from 'react-error-boundary'
Andrei Eres's avatar
Andrei Eres committed
import { ThemeProvider } from 'styled-components'
Andrei Eres's avatar
Andrei Eres committed
import { goHome } from '../utils/routing'
Andrei Eres's avatar
Andrei Eres committed
import ErrorFallback from './components/ErrorFallback'
Andrei Eres's avatar
Andrei Eres committed
import { GlobalStyle } from './global/GlobalStyle'
import Main from './global/Main'
import Router from './global/Router'
import { theme } from './theme'
Andrei Eres's avatar
Andrei Eres committed

export const App: React.FC = () => (
Andrei Eres's avatar
Andrei Eres committed
  <ThemeProvider theme={theme}>
    <GlobalStyle theme={theme} />
    <Main>
      <ErrorBoundary FallbackComponent={ErrorFallback} onReset={goHome}>
        <Router />
      </ErrorBoundary>
    </Main>
  </ThemeProvider>
Andrei Eres's avatar
Andrei Eres committed
)