import { ConfigProvider, message } from 'antd';
import ruRu from 'antd/es/locale/ru_RU';
import { StoreProvider } from 'client/contexts/storeContext';
import theme from 'client/UIKit/theme';
import { BrowserRouter } from 'react-router-dom';
import { ThemeProvider } from 'styled-components';
import Layout from './Layout';

message.config({
  top: 70,
  maxCount: 3,
});

function App() {
  return (
    <div className="App">
      <ConfigProvider locale={ruRu}>
        <ThemeProvider theme={theme}>
          <StoreProvider>
            <BrowserRouter>
              <Layout />
            </BrowserRouter>
          </StoreProvider>
        </ThemeProvider>
      </ConfigProvider>
    </div>
  );
}

export default App;
