diff --git a/src/components/PlannedSession.tsx b/src/components/PlannedSession.tsx index 04e30502..3404b5b5 100644 --- a/src/components/PlannedSession.tsx +++ b/src/components/PlannedSession.tsx @@ -1512,14 +1512,16 @@ const PlannedSession: React.FC = ({ // days: // block?.selectedWeekDays?.join(', ') || // editSession?.recurrencePattern?.daysOfWeek, - days: (editSession?.recurrencePattern?.daysOfWeek || []) - .map( - (dayIndex: any) => - ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][ - dayIndex - ] - ) - .join(', '), + days: + block?.selectedWeekDays?.join(', ') || + (editSession?.recurrencePattern?.daysOfWeek || []) + .map( + (dayIndex: any) => + ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][ + dayIndex + ] + ) + .join(', '), })} diff --git a/src/pages/centers/[cohortId]/index.tsx b/src/pages/centers/[cohortId]/index.tsx index 26661626..6fe7b554 100644 --- a/src/pages/centers/[cohortId]/index.tsx +++ b/src/pages/centers/[cohortId]/index.tsx @@ -196,7 +196,7 @@ const CohortPage = () => { }; const handleCloseSchedule = () => { - setEventCreated(true); + setEventCreated((prev) => !prev); handleClose(); };