Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"use-immer": "^0.11.0",
"uuid": "^8.3.2",
"vite": "^7.1.11",
"vite-plugin-eslint2": "^5.0.4",
"web-vitals": "^2.1.4"
"vite-plugin-eslint2": "^5.0.4"
},
"scripts": {
"start": "vite",
Expand Down Expand Up @@ -85,4 +84,4 @@
"typescript-eslint": "^8.39.0",
"vite-bundle-analyzer": "^1.2.0"
}
}
}
10 changes: 0 additions & 10 deletions client/src/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import TermsPage from "./pages/both/policy/TermsPage";
import UserSettingsPage from "./pages/both/user_page/user_settings/UserSettingsPage";
import UserTraingingsPage from "./pages/both/user_page/user_trainings/UserTrainingsPage";
import StorefrontPage from "./pages/lab_management/storefront/StorefrontPage";
import StorefrontPreviewPage from "./pages/lab_management/storefront_preview/StorefrontPreviewPage";
import HelpPage from "./pages/maker/signup/HelpPage";
import SignupPage from "./pages/maker/signup/SignupPage";
import MakerspacePage from "./pages/makerspace_page/MakerspacePage";
Expand All @@ -26,7 +24,6 @@
import StaffBar from "./pages/makerspace_page/StaffBar";
import UsersPage from "./pages/lab_management/users/UsersPage";
import UserPage from "./pages/lab_management/users/UserPage";
import { CartListPage } from "./pages/lab_management/storefront/internal/CartListPage";
import TrainingModulesPage from "./pages/lab_management/training_modules/TrainingModulesPage";
import NewModulePage from "./pages/lab_management/edit_module/NewModulePage";
import EditActiveModulePage from "./pages/lab_management/edit_module/EditActiveModulePage";
Expand All @@ -37,7 +34,6 @@
import ManageMakerspacePage from "./pages/makerspace_page/ManageMakerspacePage";
import CurrencyPage from "./pages/lab_management/currency/CurrencyPage";
import ManageRoomPage from "./pages/makerspace_page/MonitorRoomPage";
import { CartPage } from "./pages/lab_management/storefront/internal/CartPage";
import ManageEquipmentPage from "./pages/makerspace_page/equipment_pages/ManageEquipmentPage";
import ReservationRequestPage from "./pages/makerspace_page/reservation_pages/ReservationRequestPage";
import ManageReservationsPage from "./pages/makerspace_page/reservation_pages/ManageReservationsPage";
Expand All @@ -55,7 +51,7 @@
import NewThemePage from "./pages/site-settings/NewThemePage";
import ManageThemePage from "./pages/site-settings/ManageThemePage";

function AppRoot() {

Check warning on line 54 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file

Check warning on line 54 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file
return (
<CurrentUserProvider>
<Outlet />
Expand All @@ -64,7 +60,7 @@
}

// Authed Routes
function AuthedRoute() {

Check warning on line 63 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file

Check warning on line 63 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file
const user = useCurrentUser();
if (user.visitor) {
window.location.replace(import.meta.env.VITE_LOGIN_URL + "?redir=" + import.meta.env.VITE_ORIGIN + window.location.pathname);
Expand All @@ -74,7 +70,7 @@
}
}

function TrainerRoute() {

Check warning on line 73 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file

Check warning on line 73 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file
const { makerspaceID } = useParams<{ makerspaceID: string }>();
const user = useCurrentUser();
if (isOnlyTrainer(user) || isStaffFor(user, Number(makerspaceID))) {
Expand All @@ -84,7 +80,7 @@
}
}

function StaffRoute() {

Check warning on line 83 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file

Check warning on line 83 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file
const { makerspaceID } = useParams<{ makerspaceID: string }>();
const user = useCurrentUser();
if (isStaffFor(user, Number(makerspaceID))) {
Expand All @@ -94,7 +90,7 @@
}
}

function ManagerRoute() {

Check warning on line 93 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file

Check warning on line 93 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file
const { makerspaceID } = useParams<{ makerspaceID: string }>();
const user = useCurrentUser();
if (isManagerFor(user, Number(makerspaceID))) {
Expand All @@ -104,7 +100,7 @@
}
}

function AdminRoute() {

Check warning on line 103 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file

Check warning on line 103 in client/src/AppRouter.tsx

View workflow job for this annotation

GitHub Actions / build

Fast refresh only works when a file only exports components. Move your component(s) to a separate file
const user = useCurrentUser();
if (isAdmin(user)) {
return <Outlet />;
Expand All @@ -119,7 +115,6 @@
element: <AppRoot />,
children: [
{ path: "/signup", element: <SignupPage /> },
{ path: "/admin/storefront/preview", element: <StorefrontPreviewPage /> },

/* Routes for the static displays around the makerspaces */
{
Expand All @@ -141,7 +136,6 @@
{ path: "/makerspace/:makerspaceID", element: <MakerspacePage /> },
{ path: "/terms", element: <TermsPage /> },
{ path: "/help", element: <HelpPage /> },
{ path: "/storefront", element: <StorefrontPage /> },

/* Routes that need to be protected by auth */
{
Expand All @@ -162,8 +156,6 @@
children: [
{ path: "/makerspace/:makerspaceID/people", element: <UsersPage /> },
{ path: "/makerspace/:makerspaceID/people/:userID", element: <UserPage /> },
{ path: "/makerspace/:makerspaceID/storefront/carts", element: <CartListPage /> },
{ path: "/makerspace/:makerspaceID/storefront/carts/:cartID", element: <CartPage /> },

/* Routes for staff + higher */
{
Expand Down Expand Up @@ -241,8 +233,6 @@
},
/* END OF PROTECTED ROUTES */

{ path: "/storefront", element: <StorefrontPage /> },

{ path: "/logoutprompt", element: <LogoutPromptPage /> },

{ path: "*", element: <NotFoundPage /> },
Expand Down
23 changes: 0 additions & 23 deletions client/src/common/ClientOnly.tsx

This file was deleted.

25 changes: 0 additions & 25 deletions client/src/common/DeleteButton.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions client/src/common/InvItemCount.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions client/src/common/InvItemNamePic.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions client/src/common/PreviewInventoryRow.tsx

This file was deleted.

72 changes: 0 additions & 72 deletions client/src/common/TrainingModuleRow.tsx

This file was deleted.

Empty file.
113 changes: 0 additions & 113 deletions client/src/pages/lab_management/storefront/AddToCartModal.tsx

This file was deleted.

Loading
Loading