App.tsx 485 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 { 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'
Andrei Eres's avatar
Andrei Eres committed

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