diff --git a/components/publisher/PublisherShiftsModal.js b/components/publisher/PublisherShiftsModal.js index c873d8b..d8d1bd7 100644 --- a/components/publisher/PublisherShiftsModal.js +++ b/components/publisher/PublisherShiftsModal.js @@ -5,7 +5,7 @@ import axiosInstance from 'src/axiosSecure'; const PublisherShiftsModal = ({ publisher, _shifts, onClose, date, onAssignmentChange }) => { - const [shifts, setShifts] = React.useState([_shifts]); + const [shifts, setShifts] = React.useState([..._shifts]); //Refactor ToDo: show the whole month instead of just the current week by showing the shift start time in front of the rows, and show all shifts in the month from the first to the last week in the cell where we show one shift now const monthInfo = common.getMonthDatesInfo(new Date(date)); diff --git a/pages/cart/calendar/index.tsx b/pages/cart/calendar/index.tsx index 8eed9d4..4d74ca1 100644 --- a/pages/cart/calendar/index.tsx +++ b/pages/cart/calendar/index.tsx @@ -882,7 +882,7 @@ export default function CalendarPage({ initialEvents, initialShifts }) { {isModalOpen && ( setIsModalOpen(false)} date={value} onAssignmentChange={handleAssignmentChange}