icssc / AntAlmanac

A course exploration and scheduling tool for UCI Anteaters
https://antalmanac.com
MIT License
56 stars 72 forks source link

Custom Events don't load initially onto Map #813

Closed KevinWu098 closed 9 months ago

KevinWu098 commented 11 months ago

Issue

Updates to Custom Events will not properly reflect onto the Map until it's rerendered. Additionally, Custom Events won't load initially onto Map if you visit https://antalmanac.com/map

chrome-capture-2023-10-26

Good First Taskers

For any good first task doers, the solution shouldn't take more than ~13 lines of code by my estimation, and should be entirely contained to one file!

I'll do less hand-holding in this Issue, but I'll hint that the relevant file will be in the Map folder. Once you've found the relevant file, look at the surrounding code and try to see where there's an inconsistency in how Custom Events are handled versus Course Events!

If you need an extra nudge: take a look at `Map.tsx`
And as a final nudge: the inconsistency I bring up above is related to `useEffect()`

P.S: The relevant PR which implemented/caused the bug would be #726, so you can take a peek if you're curious about the source of the bug.