guild_front/src/App.js

157 lines
6.8 KiB
JavaScript
Raw Normal View History

2023-04-27 13:37:41 +03:00
import React from "react";
import {
BrowserRouter as Router,
Route,
Routes,
Navigate,
} from "react-router-dom";
2023-07-14 03:03:33 +03:00
import { getNotification } from "@redux/outstaffingSlice";
import AuthForPartners from "./pages/AuthForPartners/AuthForPartners";
import AuthForDevelopers from "./pages/AuthForDevelopers/AuthForDevelopers";
2023-07-04 22:26:00 +03:00
import { TrackerIntro } from "./pages/TrackerIntro/TrackerIntro"
2023-08-11 20:38:12 +03:00
import { CompanyInfo } from "@pages/CompanyInfo/CompanyInfo";
2023-07-07 01:20:57 +03:00
import { TrackerAuth } from "@pages/TrackerAuth/TrackerAuth";
2023-07-18 16:20:40 +03:00
import { TrackerRegistration } from "@pages/TrackerRegistration/TrackerRegistration";
2023-01-18 17:37:52 +03:00
import Home from "./pages/Home/Home";
import Candidate from "./components/Candidate/Candidate";
import Calendar from "./components/Calendar/Calendar";
import ReportForm from "./components/ReportForm/ReportForm";
2023-05-29 09:37:18 +03:00
import FreeDevelopers from "./components/FreeDevelopers/FreeDevelopers";
import { TicketFullScreen } from "./components/Modal/Tracker/TicketFullScreen/TicketFullScreen";
2023-04-07 21:49:09 +03:00
import { ProfileCalendar } from "./components/ProfileCalendar/ProfileCalendar";
2023-04-28 18:07:34 +03:00
import Article from "./pages/Article/Article";
2023-05-25 16:42:37 +03:00
import FormPage from "./pages/FormPage/FormPage";
2023-04-07 21:49:09 +03:00
import SingleReportPage from "./pages/SingleReportPage/SingleReportPage";
import { QuizPage } from "./pages/quiz/QuizPage";
2023-04-27 13:37:41 +03:00
import { QuizReportPage } from "./pages/quiz/QuizReportPage";
2023-04-07 21:49:09 +03:00
import { Profile } from "./pages/Profile/Profile.js";
import { Summary } from "./pages/Summary/Summary";
import { ViewReport } from "./pages/ViewReport/ViewReport";
import { Tracker } from "./pages/Tracker/Tracker";
import { Payouts } from "./pages/Payouts/Payouts";
import { PartnerSettings } from "./pages/PartnerSettings/PartnerSettings";
import { PartnerRequests } from "./pages/PartnerRequests/PartnerRequests";
import { PartnerAddRequest } from "./pages/PartnerAddRequest/PartnerAddRequest";
import { PartnerBid } from "./pages/PartnerBid/PartnerBid";
import { PartnerCategories } from "./pages/PartnerСategories/PartnerСategories";
import { PartnerTreaties } from "./pages/PartnerTreaties/PartnerTreaties";
import { PartnerEmployees } from "./pages/PartnerEmployees/PartnerEmployees";
2023-04-27 13:37:41 +03:00
import { AuthForCandidate } from "./pages/AuthForCandidate/AuthForCandidate";
import { RegistrationForCandidate } from "./pages/RegistrationForCandidate/RegistrationForCandidate";
import { ProfileCandidate } from "./pages/ProfileCandidate/ProfileCandidate";
import { PassingTests } from "./pages/quiz/PassingTests";
2023-04-28 18:07:34 +03:00
import Blog from "./pages/Blog/Blog";
2023-10-02 21:26:06 +03:00
import Statistics from "@pages/Statistics/Statistics";
2023-05-02 18:51:19 +03:00
import { ProjectTracker } from "./pages/ProjectTracker/ProjectTracker";
2023-04-27 21:15:55 +03:00
import { FrequentlyAskedQuestions } from "./pages/FrequentlyAskedQuestions/FrequentlyAskedQuestions";
import { FrequentlyAskedQuestion } from "./pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion";
2023-07-14 03:03:33 +03:00
import Notification from "@components/Notification/Notification";
import { useSelector } from "react-redux";
2023-04-27 21:15:55 +03:00
2023-04-27 13:37:41 +03:00
import "./assets/global.scss";
2023-05-25 17:26:51 +03:00
import "./assets/fonts/stylesheet.css";
2023-04-27 13:37:41 +03:00
import "bootstrap/dist/css/bootstrap.min.css";
2023-01-18 17:37:52 +03:00
2023-10-02 21:26:06 +03:00
2022-06-01 19:59:54 +03:00
const App = () => {
2023-07-14 03:03:33 +03:00
const notification = useSelector(getNotification)
return (
2023-04-27 13:37:41 +03:00
<>
<Router>
<Routes>
<Route exact path="/authdev" element={<AuthForDevelopers />} />
<Route exact path="/auth" element={<AuthForPartners />} />
2023-07-04 22:26:00 +03:00
<Route exact path="/tracker-intro" element={<TrackerIntro />} />
2023-07-07 01:20:57 +03:00
<Route exact path="/tracker-auth" element={<TrackerAuth />} />
2023-07-18 16:20:40 +03:00
<Route exact path="/tracker-registration" element={<TrackerRegistration />} />
2023-08-11 20:38:12 +03:00
<Route exact path="/company" element={<CompanyInfo />} />
2023-05-23 17:15:12 +03:00
2023-04-27 13:37:41 +03:00
<Route exact path="/worker/:id" element={<FreeDevelopers />} />
<Route
exact
2023-04-27 15:13:14 +03:00
path="/tracker/task/:id"
2023-04-27 13:37:41 +03:00
element={<TicketFullScreen />}
></Route>
2023-05-02 20:29:10 +03:00
<Route
exact
path="/tracker/project/:id"
element={<ProjectTracker />}
/>
2023-11-28 22:03:56 +03:00
<Route exact path="/tracker-start"></Route>
2023-04-27 13:37:41 +03:00
<Route exact path="/auth-candidate" element={<AuthForCandidate />} />
<Route
exact
path="/registration-candidate"
element={<RegistrationForCandidate />}
/>
2023-04-27 15:13:14 +03:00
<Route exact path="/blog" element={<Blog />}></Route>
2023-04-28 18:07:34 +03:00
<Route exact path="/blog/article/:id" element={<Article />}></Route>
2023-05-23 17:15:12 +03:00
<Route
exact
path="/frequently-asked-questions"
element={<FrequentlyAskedQuestions />}
/>
<Route
exact
path="/frequently-asked-question/:id"
element={<FrequentlyAskedQuestion />}
/>
2023-04-27 15:13:14 +03:00
2023-04-27 13:37:41 +03:00
<Route exact path="/candidate/:id" element={<Candidate />} />
<Route exact path="/candidate/:id/form" element={<FormPage />} />
<Route path="/:userId/calendar" element={<Calendar />} />
2023-04-27 13:37:41 +03:00
<Route exact path="/report" element={<ReportForm />} />
<Route path="/report/:id" element={<SingleReportPage />} />
2023-04-27 13:37:41 +03:00
<Route exact path="quiz">
<Route index element={<QuizPage />} />
<Route exact path="test" element={<PassingTests />} />
<Route exact path="report" element={<QuizReportPage />} />
</Route>
2023-04-27 13:37:41 +03:00
<Route exact path="profile">
<Route index element={<Profile />} />
<Route exact path="catalog" element={<Home />} />
<Route exact path="calendar" element={<ProfileCalendar />} />
2023-05-11 19:54:15 +03:00
<Route exact path="calendar/view/" element={<ProfileCalendar />} />
2023-04-27 13:37:41 +03:00
<Route exact path="summary" element={<Summary />} />
2023-05-11 19:54:15 +03:00
<Route exact path="view/:id" element={<ViewReport />} />
2023-04-27 13:37:41 +03:00
<Route exact path="tracker" element={<Tracker />} />
2023-10-02 21:26:06 +03:00
<Route exact path="statistics/:id" element={<Statistics/>}/>
2023-04-27 13:37:41 +03:00
<Route exact path="payouts" element={<Payouts />} />
<Route exact path="settings" element={<PartnerSettings />} />
<Route exact path="requests" element={<PartnerRequests />} />
<Route exact path="add-request" element={<PartnerAddRequest />} />
<Route exact path="edit-request" element={<PartnerAddRequest />} />
<Route exact path="bid" element={<PartnerBid />} />
<Route exact path="categories" element={<PartnerCategories />} />
<Route exact path="treaties" element={<PartnerTreaties />} />
<Route
exact
path="categories/employees"
element={<PartnerEmployees />}
/>
</Route>
2023-11-28 22:03:56 +03:00
2023-04-27 13:37:41 +03:00
<Route exact path="profile-candidate/:id">
<Route index element={<ProfileCandidate />} />
</Route>
2023-04-27 13:37:41 +03:00
<Route path="*" element={<Navigate to="/auth" replace />} />
</Routes>
</Router>
2023-07-14 03:03:33 +03:00
{notification.show &&
<Notification />
}
2023-04-27 13:37:41 +03:00
</>
);
};
2023-04-27 13:37:41 +03:00
export default App;