Skip to content

Commit

Permalink
Revert "feat(aoc): add AoC page and styles (neiist-dev#380)"
Browse files Browse the repository at this point in the history
This reverts commit a0b65af.
  • Loading branch information
guilherme-batalheiro authored Nov 26, 2024
1 parent cd1f97b commit 3d1ac39
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 279 deletions.
41 changes: 15 additions & 26 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect, useContext, Suspense, lazy } from 'react';
import {
BrowserRouter,
BrowserRouter,
Routes,
Route,
Navigate
Expand Down Expand Up @@ -29,13 +29,11 @@ const AdminElectionsPage = lazy(() => import("./pages/AdminElectionsPage.jsx"));
const GacPage = lazy(() => import("./pages/GacPage.jsx"));
const CollabsPage = lazy(() => import("./pages/CollabsPage.jsx"));

const AoCPage = lazy(() => import("./pages/aoc/AoCPage.jsx"));

const Error = ({ error, errorDescription }) => (
<>
<h1>{error}</h1>
<p>{errorDescription}</p>
</>
<>
<h1>{error}</h1>
<p>{errorDescription}</p>
</>
);

const App = () => {
Expand Down Expand Up @@ -69,9 +67,9 @@ const App = () => {
};

const Redirect = (user) => window.location.replace(
user?.isCollab ? '/collab' :
user?.isMember ? '/socios' :
'/'
user?.isCollab ? '/collab':
user?.isMember ? '/socios':
'/'
);

useEffect(() => {
Expand Down Expand Up @@ -106,23 +104,14 @@ const App = () => {
<UserDataContext.Provider value={{ userData, setUserData }}>
<MantineProvider>
<BrowserRouter>
<Routes>
<Route path="/AoC" element={
<Suspense fallback={<LoadSpinner />}>
<AoCPage />
</Suspense>
} />
<Route path="/*" element={
<Layout>
<Suspense fallback={<LoadSpinner />}>
<DefinedRoutes />
</Suspense>
</Layout>
} />
</Routes>
<Layout>
<Suspense fallback={<LoadSpinner />}>
<DefinedRoutes />
</Suspense>
</Layout>
</BrowserRouter>
</MantineProvider>
</UserDataContext.Provider>
</UserDataContext.Provider>
);
};

Expand Down Expand Up @@ -171,7 +160,7 @@ const PrivateRoute = ({ condition, children }) => {
};

const ActiveTecnicoStudentRoute = ({ children }) => (
<PrivateRoute children={children} condition={'isActiveTecnicoStudent'} />
<PrivateRoute children={children} condition={'isActiveTecnicoStudent'} />
);

const ActiveLMeicStudentRoute = ({ children }) => (
Expand Down
204 changes: 0 additions & 204 deletions client/src/pages/aoc/AoCPage.jsx

This file was deleted.

49 changes: 0 additions & 49 deletions client/src/pages/aoc/styles.css

This file was deleted.

0 comments on commit 3d1ac39

Please sign in to comment.