Skip to content

Commit fef4bdc

Browse files
Created NavBarSchedule container to distinguish in/out clicks
1 parent eaea734 commit fef4bdc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/molecules/NavBar/NavBar.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const NavBar: React.FC<NavBarPropsType> = ({
142142
setEventScheduleVisible(!isEventScheduleVisible);
143143
}, [isEventScheduleVisible]);
144144
const hideEventSchedule = useCallback((e) => {
145-
if (e.target.closest(".NavBarSchedule")) return;
145+
if (e.target.closest(".NavBar__schedule-dropdown")) return;
146146

147147
setEventScheduleVisible(false);
148148
}, []);
@@ -317,7 +317,9 @@ const NavBar: React.FC<NavBarPropsType> = ({
317317
}`}
318318
onClick={hideEventSchedule}
319319
>
320-
<NavBarSchedule isVisible={isEventScheduleVisible} />
320+
<div className="NavBar__schedule-dropdown">
321+
<NavBarSchedule isVisible={isEventScheduleVisible} />
322+
</div>
321323
</div>
322324

323325
{/* @debt Remove back button from Navbar */}

src/components/organisms/NavBarSchedule/NavBarSchedule.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ export const NavBarSchedule: FC<NavBarScheduleProps> = ({ isVisible }) => {
121121
};
122122
}, [relatedVenueEvents, userEventIds, selectedDayIndex, getEventLocation]);
123123

124-
// if .NavBarSchedule is changed, we need to update the class name in NavBar#hideEventSchedule event handler as well
125124
const containerClasses = classNames("NavBarSchedule", {
126125
"NavBarSchedule--show": isVisible,
127126
});

0 commit comments

Comments
 (0)