Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1617 - refactor User page handler #1618

Merged
merged 1 commit into from
Oct 2, 2023
Merged

fix #1617 - refactor User page handler #1618

merged 1 commit into from
Oct 2, 2023

Conversation

Atmosfearful
Copy link
Collaborator

@Atmosfearful Atmosfearful commented Oct 2, 2023

Description

The user page generation created an infinite redirect loop if the user did not have a handle, because it kept redirecting to /users/undefined

This was hard to debug because the getStaticProps logic is difficult to reason with & page requirements were not clear.
So I refactored the whole handler to be a bit more verbose, but much more explicit about the requirements, and easier to follow the happy/sad paths.

Resolves #1617

@Atmosfearful Atmosfearful temporarily deployed to Preview – carbonmark-api October 2, 2023 20:01 — with GitHub Actions Inactive
@vercel
Copy link

vercel bot commented Oct 2, 2023

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

Name Status Preview Comments Updated (UTC)
carbonmark ✅ Ready (Inspect) Visit Preview Oct 2, 2023 8:04pm
carbonmark-api ✅ Ready (Inspect) Visit Preview Oct 2, 2023 8:04pm
demo-integration ✅ Ready (Inspect) Visit Preview Oct 2, 2023 8:04pm
klimadao-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 2, 2023 8:04pm
klimadao-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 2, 2023 8:04pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
carbonmark-data ⬜️ Ignored (Inspect) Oct 2, 2023 8:04pm

@Atmosfearful Atmosfearful merged commit 5c0cf6b into staging Oct 2, 2023
10 checks passed
@Atmosfearful Atmosfearful deleted the atmos/#1617 branch October 2, 2023 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[bug] Metamask login loop
2 participants