Fix: Use local venue data for development instead of prod data
Context
Closes #3803
Implementation
The solution checks if the user is on localhost, and if they are, it will opt to use the local venue data instead of the production data by default. To override this behavior, the user can add a query parameter prodVenue to their URL, which will enable them to use production data instead.
Other Information
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 | Nov 25, 2024 6:59am |
| nusmods-website | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 25, 2024 6:59am |
@kavishsathia is attempting to deploy a commit to the modsbot's projects Team on Vercel.
A member of the Team first needs to authorize it.
Codecov Report
Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
Project coverage is 54.57%. Comparing base (
2d4743d) to head (c536886). Report is 25 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| website/src/utils/debug.ts | 25.00% | 3 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #3810 +/- ##
==========================================
+ Coverage 53.87% 54.57% +0.69%
==========================================
Files 274 274
Lines 6032 6056 +24
Branches 1449 1449
==========================================
+ Hits 3250 3305 +55
+ Misses 2782 2751 -31
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
May I know what's the motivation behind changing this default?
I've made the change to use NUSMODS_ENV per Ravern's review. Also, I re-added prodVenue to override the default in when in the prod environment.
Thanks for the initial patch!