import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import { ChakraProvider, theme as chakraTheme } from '@chakra-ui/react';

import Routers from './routes';
import ErrorBoundary from './components/ErrorBoundary';

const App = () => {
  return (
    <ChakraProvider theme={chakraTheme}>
      <ErrorBoundary>
        <BrowserRouter>
          <Routers />
        </BrowserRouter>
      </ErrorBoundary>
    </ChakraProvider>
  );
};

export default App;
