diff --git a/frontend/src/pages/schedule/SchedulePage.jsx b/frontend/src/pages/schedule/SchedulePage.jsx
index 632edf2..e047a7a 100644
--- a/frontend/src/pages/schedule/SchedulePage.jsx
+++ b/frontend/src/pages/schedule/SchedulePage.jsx
@@ -1,10 +1,19 @@
-import useSchedulePage from './useSchedulePage.js';
+import { CircularProgress } from '@mui/material';
import ObjListTable from '../../components/table/ObjListTable.jsx';
+import useSchedulePage from './useSchedulePage.js';
import './SchedulePage.css';
export default function SchedulePage() {
const { tableWorkshopsData, tablePresentationsData } = useSchedulePage();
+ if (!tableWorkshopsData || !tablePresentationsData) {
+ return (
+
+
+
+ );
+ }
+
return (
diff --git a/frontend/src/pages/workshops/WorkshopsPage.jsx b/frontend/src/pages/workshops/WorkshopsPage.jsx
index 2cb2c21..8051f05 100644
--- a/frontend/src/pages/workshops/WorkshopsPage.jsx
+++ b/frontend/src/pages/workshops/WorkshopsPage.jsx
@@ -1,51 +1,51 @@
-import ItemCard from "../../components/item-card/item-card.jsx";
-import Toast from "../../components/toast/Toast.jsx";
-import {Helper} from "../../utils/Helper.js";
-import useWorkshopsPage from "./useWorkshopsPage.js";
+import { CircularProgress } from '@mui/material';
+import ItemCard from '../../components/item-card/item-card.jsx';
+import Toast from '../../components/toast/Toast.jsx';
+import { Helper } from '../../utils/Helper.js';
+import useWorkshopsPage from './useWorkshopsPage.js';
export default function WorkshopsPage() {
+ const { parsedItemsList, addToCart, toastData, setOpenToast, openToast } = useWorkshopsPage();
- const {
- parsedItemsList,
- addToCart,
- gridTemplateColumnsValue,
- toastData,
- setOpenToast,
- openToast,
- } = useWorkshopsPage()
+ const getItemsList = () => {
+ if (parsedItemsList) {
+ return parsedItemsList.map((item, index) => (
+
+ addToCart({
+ id: item.id,
+ type: item.isWorkshop ? 'workshop' : 'presentation',
+ })
+ }
+ />
+ ));
+ }
- return (
-
- {toastData && }
- {parsedItemsList && parsedItemsList.map((e, index) => {
- return (
- addToCart({
- id: e.id,
- type: e.isWorkshop ? "workshop" : "presentation"
- })}
- />
- )
- })}
-
- )
-}
\ No newline at end of file
+ return ;
+ };
+
+ return (
+
+ {toastData && (
+
+ )}
+ {getItemsList()}
+
+ );
+}