guild_front/src/App.js

114 lines
5.0 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";
import AuthForPartners from "./pages/AuthForPartners/AuthForPartners";
import AuthForDevelopers from "./pages/AuthForDevelopers/AuthForDevelopers";
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-04-07 21:49:09 +03:00
import FreeDevelopers from "./components/UI/FreeDevelopers/FreeDevelopers";
2023-04-27 13:37:41 +03:00
import { TicketFullScreen } from "./components/UI/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-04-07 21:49:09 +03:00
import FormPage from "./pages/FormPage/FormPage.js";
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-04-27 13:37:41 +03:00
import "./assets/global.scss";
import "./fonts/stylesheet.css";
import "bootstrap/dist/css/bootstrap.min.css";
2023-01-18 17:37:52 +03:00
2022-06-01 19:59:54 +03:00
const App = () => {
return (
2023-04-27 13:37:41 +03:00
<>
<Router>
<Routes>
<Route exact path="/authdev" element={<AuthForDevelopers />} />
<Route exact path="/auth" element={<AuthForPartners />} />
<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>
<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-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 />} />
<Route exact path="summary" element={<Summary />} />
<Route exact path="view" element={<ViewReport />} />
<Route exact path="tracker" element={<Tracker />} />
<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>
<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-04-27 13:37:41 +03:00
export default App;