import "bootstrap/dist/css/bootstrap.min.css";
import React from "react";
import { useSelector } from "react-redux";
import {
  Navigate,
  Route,
  BrowserRouter as Router,
  Routes
} from "react-router-dom";

import { getNotification } from "@redux/outstaffingSlice";

import { MainPage } from "@pages/MainPage/MainPage";

import { Notification } from "@components/Notification/Notification";

import "assets/fonts/stylesheet.css";
import "assets/global.scss";

const App = () => {
  const notification = useSelector(getNotification);
  return (
    <>
      <Router>
        <Routes>
          <Route path="*" element={<MainPage />} />
        </Routes>
      </Router>
      {notification.show && <Notification />}
    </>
  );
};

export default App;
