nusmodifications / nusmods

🏫 Official course planning platform for National University of Singapore.
https://nusmods.com
MIT License
558 stars 270 forks source link

random course picker button #3735

Open Nimastic opened 2 weeks ago

Nimastic commented 2 weeks ago

Hi I added a feature request: random course picker button in settings (first good issue)

Context

https://github.com/nusmodifications/nusmods/issues/3671 Feature Request: Random Course Picker

Implementation

I created api.ts in website/src/utils/api.ts to fetch list of modules from NUSMods API I also created randomCoursePicker.ts in website/src/utils/randomCoursePicker.ts to fetch a random course from the list of modules fetched from the API Lastly I added button and function in website/src/views/settings/SettingsContainer.tsx for picking a random course Overall, I created a random course picker button in the settings

ezgif-2-7618a9ce9f

Other Information

Hi I'm new to this as both a contributor on this repository and as an OS contributor. Do let me know if I have done anything wrongly. I wasn't too sure where to add the button, hence i added it into settings. Do let me know if it isn't the right place to add it.

Hope to learn more :)

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nusmods-export ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 5:51am
nusmods-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 5:51am
vercel[bot] commented 2 weeks ago

@Nimastic is attempting to deploy a commit to the modsbot's projects Team on Vercel.

A member of the Team first needs to authorize it.