diff --git a/src/Pages/Store/Calendar/index.js b/src/Pages/Store/Calendar/index.js index 98e785e..bc598f1 100644 --- a/src/Pages/Store/Calendar/index.js +++ b/src/Pages/Store/Calendar/index.js @@ -19,7 +19,7 @@ import { getUserSessionFromLocalStorage, myFetch, } from "../../../utils"; -import { useEffect, useRef, useState } from "react"; +import { Suspense, useEffect, useRef, useState } from "react"; import MyCenteredContainer from "../../../Components/MyContainer"; import { MyCalendarMaxFutureBookingDaysFormInput, @@ -34,9 +34,11 @@ import MyModal, { MyModalCloseConfirmButtonFooter, MyModalCloseSaveButtonFooter, } from "../../../Components/MyModal"; +import { useParams } from "react-router-dom"; export default function StoreCalendar() { const { t } = useTranslation(); + const { storeId } = useParams(); const [calendarSettings, setCalendarSettings] = useState({}); const [isRequesting, setIsRequesting] = useState(true); @@ -102,6 +104,10 @@ export default function StoreCalendar() { /> )} + + + + )} @@ -109,6 +115,27 @@ export default function StoreCalendar() { ); } +function CalendarFrame({ storeId }) { + const [isLoading, setIsLoading] = useState(true); + + return ( + <> + {isLoading && ( + + + + )} +