import React from 'react';
import { ToastContainer } from 'react-toastify';
import { RecoilRoot } from 'recoil';

import './App.css';

import { Router } from './routes/Router';
import analytics from './utils/analytics';

function App() {
    analytics.init();

    return (
        <RecoilRoot>
            <div className="App">
                <ToastContainer
                    position="top-right"
                    autoClose={5000}
                    hideProgressBar={false}
                    newestOnTop={false}
                    closeOnClick
                    rtl={false}
                    pauseOnFocusLoss
                    draggable
                    pauseOnHover
                />
                <Router />
            </div>
        </RecoilRoot>
    );
}

export default App;
