fix: Schedule Switching Bugs (#138)
* style: course selection fix * fix: generic bugs on course selection * fix: schedule switch lag when popup is open for too long * fix: storybook bug * chore: remove unnecessary dependency
This commit is contained in:
@@ -30,7 +30,7 @@ export default function PopupMain(): JSX.Element {
|
||||
|
||||
useEffect(() => {
|
||||
function handleClickOutside(event) {
|
||||
if (!popupRef.current.contains(event.target) && !toggleRef.current.contains(event.target)) {
|
||||
if (!popupRef.current?.contains(event.target) && !toggleRef.current?.contains(event.target)) {
|
||||
setIsPopupVisible(false);
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ export default function PopupMain(): JSX.Element {
|
||||
{nonActiveSchedules.map(schedule => (
|
||||
<div
|
||||
key={schedule.name}
|
||||
className='my-2 cursor-pointer border border-gray-300 rounded-md border-solid bg-white py-4 shadow-sm hover:bg-gray-100'
|
||||
className='my-2 cursor-pointer border border-gray-300 rounded-md border-solid bg-white p-2 shadow-sm hover:bg-gray-100'
|
||||
onClick={() => selectSchedule(schedule)}
|
||||
>
|
||||
<Text as='div' variant='h1-course' className='color-ut-burntorange'>
|
||||
|
||||
Reference in New Issue
Block a user