Update @supabase/ssr version, add /homepage to redirects array #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Include the corresponding Jira issue key and #done in the PR title, like so: "JRA-123 #done Migrate Election Reminders"N/ACreate Storybook stories for visual componentsN/AVerify that any visual components match the FigmaN/ATest with a screen reader (if applicable)N/AOverview
This PR updates the @supabase/ssr version to version 0.5.1 and updates the usage of said package to reflect the latest example provided by the Supabase docs. The original example was causing intermittent 500 errors because cookies were being set in a Server component, which is not allowed in Next.js and throws an exception. The new docs for this package indicate that the logic inside the
setAll
method provided tocreateServerClient
should be wrapped in atry...catch
block to avoid this situation.Here is a screenshot of the error:
The updated docs can be viewed here.
This PR also adds
/homepage
to theredirects
array innext.config.mjs
./homepage
redirects to/
. This is necessary because the main 8by8 site (https://8by8.us) contains links to the challenge application. These links currently point to/homepage
. Until the main site can be updated, we should redirect users coming from/homepage
so that they don't hit our 404 page.Test Plan
All unit tests pass. I verified that a user visiting
/homepage
is redirected to/
.Follow ups
We should continue to monitor Vercel logs.