src/components/events/events-view/calendar-popup/calendarPopup.js
// Add/Modify/Remove Events Page => EditEventPopup
Add/Modify/Remove Events Page => EditEventPopup
Add / Modify / Remove Events Page = > EditEventPopup
function renderPopup() {
    const currentEvent = useSelector(getSelectedEvent);
    const selectedEvent = getRegularSelectedEvent(allRegularEvents, currentEvent);
    const popupType = useSelector(getPopupType);
    const popupIsOpen = useSelector(getShowPopup);
    if (popupIsOpen) {
      switch (page) {
        case 'volunteerDashboard':
          if (popupType === 'LogHoursForm') {
            return (
              <SubmitHoursPopup
                isModalOpen={popupIsOpen}
                setIsModalOpen={(open) => dispatch(setShowPopup(open))}
                eventId={selectedEvent.id}
              />
            );
          }
          return <EventPopup event={selectedEvent} isOpen={popupIsOpen} />;
        case 'addModifyDeleteEventsPage':
          return (
            <EventForm />
          );
        case 'aggregatePage':
          return <DialogueBox onClose={onClosePopup} event={selectedEvent} />;
        default: break;
      }
    }
    return null;
  }
function renderPopup ( ) { const currentEvent = useSelector ( getSelectedEvent ) ; const selectedEvent = getRegularSelectedEvent ( allRegularEvents , currentEvent ) ; const popupType = useSelector ( getPopupType ) ; const popupIsOpen = useSelector ( getShowPopup ) ; if ( popupIsOpen ) { switch ( page ) { case 'volunteerDashboard' : if ( popupType === 'LogHoursForm' ) { return ( < SubmitHoursPopup isModalOpen = { popupIsOpen } setIsModalOpen = { ( open ) => dispatch ( setShowPopup ( open ) ) } eventId = { selectedEvent . id } / > ) ; } return < EventPopup event = { selectedEvent } isOpen = { popupIsOpen } / > ; case 'addModifyDeleteEventsPage' : return ( < EventForm / > ) ; case 'aggregatePage' : return < DialogueBox onClose = { onClosePopup } event = { selectedEvent } / > ; default : break ; } } return null ; }
Add/Modify/Remove Events Page => EditEventPopup
Add / Modify / Remove Events Page = > EditEventPopup
// Convert current full calendar event to regular event // Event is NOT on the user's calendar // Event is on the user's calendar already