Skip to content

Commit

Permalink
Merge pull request #83 from Kurczak1233/next.js-migration
Browse files Browse the repository at this point in the history
REmoved edit bundles
  • Loading branch information
Kurczak1233 authored Sep 18, 2022
2 parents e943b54 + b562bee commit 6653d10
Showing 1 changed file with 9 additions and 37 deletions.
46 changes: 9 additions & 37 deletions App/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ import ArticleMenuContent from "components/common/ArticleCommonComponents/Articl
import ProfilePageMenu from "components/ProfilePageComponents/ProfilePageMenu/ProfillePageMenu";
import CooperationsMenuContent from "components/common/ArticleCommonComponents/CooperationsMenuContent/CooperationsMenuContent";
import MainPage from "./pages/MainPage/MainPage";

import EditEduLinkPage from "pages/AdministrationSubpages/ArticlesPage/Edit/EduLinks/EditEduLinkPage";
import EditJobOfferPage from "pages/AdministrationSubpages/ArticlesPage/Edit/JobOffers/EditJobOfferPage";
import EditPostPage from "pages/AdministrationSubpages/ArticlesPage/Edit/Posts/EditPostPage";
import styles from "./App.module.scss";
import BigLoader from "components/common/Loaders/BigLoader/BigLoader";

Expand Down Expand Up @@ -112,24 +114,6 @@ function App() {
"pages/AdministrationSubpages/ArticlesPage/Overview/Posts/PostsPage"
)
);
const EditEduLinkPage = React.lazy(
() =>
import(
"pages/AdministrationSubpages/ArticlesPage/Edit/EduLinks/EditEduLinkPage"
)
);
const EditJobOfferPage = React.lazy(
() =>
import(
"pages/AdministrationSubpages/ArticlesPage/Edit/JobOffers/EditJobOfferPage"
)
);
const EditPostPage = React.lazy(
() =>
import(
"pages/AdministrationSubpages/ArticlesPage/Edit/Posts/EditPostPage"
)
);

const { checkIfRouteIsAuthenticated } = AppLogic();

Expand Down Expand Up @@ -194,49 +178,37 @@ function App() {
path={`${postsRoute}`}
element={checkIfRouteIsAuthenticated(
<Suspense fallback={<div />}>
<PostsPage />{" "}
<PostsPage />
</Suspense>
)}
/>
<Route
path={`${jobOffersRoute}`}
element={checkIfRouteIsAuthenticated(
<Suspense fallback={<div />}>
<JobOffersPage />{" "}
<JobOffersPage />
</Suspense>
)}
/>
<Route
path={`${eduLinksRoute}`}
element={checkIfRouteIsAuthenticated(
<Suspense fallback={<div />}>
<EduLinksPage />{" "}
<EduLinksPage />
</Suspense>
)}
/>
<Route
path={`${postsRoute}/:${postId}`}
element={checkIfRouteIsAuthenticated(
<Suspense fallback={<div />}>
<EditPostPage />{" "}
</Suspense>
)}
element={checkIfRouteIsAuthenticated(<EditPostPage />)}
/>
<Route
path={`${eduLinksRoute}/:${postId}`}
element={checkIfRouteIsAuthenticated(
<Suspense fallback={<div />}>
<EditEduLinkPage />{" "}
</Suspense>
)}
element={checkIfRouteIsAuthenticated(<EditEduLinkPage />)}
/>
<Route
path={`${jobOffersRoute}/:${postId}`}
element={checkIfRouteIsAuthenticated(
<Suspense fallback={<div />}>
<EditJobOfferPage />{" "}
</Suspense>
)}
element={checkIfRouteIsAuthenticated(<EditJobOfferPage />)}
/>
<Route
path={`${createPostRoute}`}
Expand Down

0 comments on commit 6653d10

Please sign in to comment.