Western-Rank / western-rank

A course review platform for Western University and affiliate colleges!
https://westernrank.com
4 stars 0 forks source link

Bug / Quality of Life: Search Explore Button Fix #98

Open rgavigan opened 7 months ago

rgavigan commented 7 months ago

Scenario:

Suggested fix:

basokant commented 7 months ago

I think we should go for the simple fix for now, and later down the line we could add a search bar on the explore page to filter through the results.

basokant commented 7 months ago

Here's some guidance on the simple fix:

In components/SearchBar.tsx, we should change the onSelect handler to also close the SearchBarDialog, which we're already doing the course CommandItem components. Add this line

if (onSelect) onSelect(value);

to the handler for the explore courses CommandItem component (here: https://github.com/Western-Rank/western-rank/blob/main/components/Searchbar.tsx#L141).