This commit is contained in:
Victor Batischev 2024-02-14 19:32:51 +03:00
parent 140adb0051
commit 42cae241f2

View File

@ -3,14 +3,14 @@ import {
BrowserRouter as Router, BrowserRouter as Router,
Route, Route,
Routes, Routes,
Navigate, Navigate
} from "react-router-dom"; } from "react-router-dom";
import { getNotification } from "@redux/outstaffingSlice"; import { getNotification } from "@redux/outstaffingSlice";
import Auth from "./pages/Auth/Auth"; import Auth from "./pages/Auth/Auth";
import CatalogSpecialists from "@pages/CatalogSpecialists/CatalogSpecialists"; import CatalogSpecialists from "@pages/CatalogSpecialists/CatalogSpecialists";
import { TrackerIntro } from "@pages/TrackerIntro/TrackerIntro" import { TrackerIntro } from "@pages/TrackerIntro/TrackerIntro";
import { CompanyInfo } from "@pages/CompanyInfo/CompanyInfo"; import { CompanyInfo } from "@pages/CompanyInfo/CompanyInfo";
import { TrackerAuth } from "@pages/TrackerAuth/TrackerAuth"; import { TrackerAuth } from "@pages/TrackerAuth/TrackerAuth";
import { TrackerRegistration } from "@pages/TrackerRegistration/TrackerRegistration"; import { TrackerRegistration } from "@pages/TrackerRegistration/TrackerRegistration";
@ -57,7 +57,7 @@ import "./assets/fonts/stylesheet.css";
import "bootstrap/dist/css/bootstrap.min.css"; import "bootstrap/dist/css/bootstrap.min.css";
const App = () => { const App = () => {
const notification = useSelector(getNotification) const notification = useSelector(getNotification);
return ( return (
<> <>
<Router> <Router>
@ -65,10 +65,22 @@ const App = () => {
<Route exact path="/auth" element={<Auth />} /> <Route exact path="/auth" element={<Auth />} />
<Route exact path="/tracker-intro" element={<TrackerIntro />} /> <Route exact path="/tracker-intro" element={<TrackerIntro />} />
<Route exact path="/tracker-auth" element={<TrackerAuth />} /> <Route exact path="/tracker-auth" element={<TrackerAuth />} />
<Route exact path="/tracker-registration" element={<TrackerRegistration />} /> <Route
exact
path="/tracker-registration"
element={<TrackerRegistration />}
/>
<Route exact path="/company" element={<CompanyInfo />} /> <Route exact path="/company" element={<CompanyInfo />} />
<Route exact path="/registration-setting" element={<RegistrationSetting />} /> <Route
<Route exact path="/catalog-specialists" element={<CatalogSpecialists />} /> exact
path="/registration-setting"
element={<RegistrationSetting />}
/>
<Route
exact
path="/catalog-specialists"
element={<CatalogSpecialists />}
/>
<Route exact path="/worker/:id" element={<FreeDevelopers />} /> <Route exact path="/worker/:id" element={<FreeDevelopers />} />
<Route <Route
@ -113,7 +125,11 @@ const App = () => {
<Route exact path="catalog" element={<Home />} /> <Route exact path="catalog" element={<Home />} />
<Route exact path="calendar" element={<ProfileCalendar />} /> <Route exact path="calendar" element={<ProfileCalendar />} />
<Route exact path="calendar/report" element={<ReportForm />} /> <Route exact path="calendar/report" element={<ReportForm />} />
<Route exact path="calendar/view/:date/:id" element={<ViewReport />} /> <Route
exact
path="calendar/view/:date/:id"
element={<ViewReport />}
/>
<Route exact path="summary" element={<Summary />} /> <Route exact path="summary" element={<Summary />} />
<Route exact path="tracker" element={<Tracker />} /> <Route exact path="tracker" element={<Tracker />} />
<Route exact path="statistics/:id" element={<Statistics />} /> <Route exact path="statistics/:id" element={<Statistics />} />
@ -124,7 +140,11 @@ const App = () => {
<Route exact path="requests-edit" element={<PartnerAddRequest />} /> <Route exact path="requests-edit" element={<PartnerAddRequest />} />
<Route exact path="requests-bid" element={<PartnerBid />} /> <Route exact path="requests-bid" element={<PartnerBid />} />
<Route exact path="employees" element={<PartnerCategories />} /> <Route exact path="employees" element={<PartnerCategories />} />
<Route exact path="employees/report/:uuid" element={<PartnerEmployeeReport />} /> <Route
exact
path="employees/report/:uuid"
element={<PartnerEmployeeReport />}
/>
<Route exact path="treaties" element={<PartnerTreaties />} /> <Route exact path="treaties" element={<PartnerTreaties />} />
<Route exact path="quiz"> <Route exact path="quiz">
<Route index element={<QuizPage />} /> <Route index element={<QuizPage />} />
@ -139,7 +159,6 @@ const App = () => {
/> />
</Route> </Route>
<Route exact path="profile-candidate/:id"> <Route exact path="profile-candidate/:id">
<Route index element={<ProfileCandidate />} /> <Route index element={<ProfileCandidate />} />
</Route> </Route>
@ -147,9 +166,7 @@ const App = () => {
<Route path="*" element={<Navigate to="/auth" replace />} /> <Route path="*" element={<Navigate to="/auth" replace />} />
</Routes> </Routes>
</Router> </Router>
{notification.show && {notification.show && <Notification />}
<Notification />
}
</> </>
); );
}; };