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

[ECO-2389] Render /launch as a static page #335

Merged
merged 6 commits into from
Nov 14, 2024
Merged

[ECO-2389] Render /launch as a static page #335

merged 6 commits into from
Nov 14, 2024

Conversation

xbtmatt
Copy link
Collaborator

@xbtmatt xbtmatt commented Nov 8, 2024

Description

We can make /launch a completely static page, making it faster to load, by making the geoblock check client-side. We'll assume the user is geoblocked while the geoblocked function check promise resolves.

There may be a better way to do this, if this is too intrusive (assuming they're blocked when they're not), depending on how the banner appears.

  • const dynamic = "force-static" at the top of the file
  • Check if the user is geoblocked with a react-query server action hook

Testing

Check the build logs and ensure it's marked as a statically generated page in Vercel

Checklist

  • Did you update relevant documentation?
  • Did you add tests to cover new code or a fixed issue?
  • Did you update the changelog?
  • Did you check all checkboxes from the linked Linear task?

Copy link

vercel bot commented Nov 8, 2024

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

Name Status Preview Comments Updated (UTC)
emojicoin-dot-fun ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 6:38pm
emojicoin-dot-fun-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 6:38pm

Copy link
Collaborator

@CRBl69 CRBl69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only use one geo-blocking logic. If you think the hook works great, can you replace it everywhere ?

@alnoki alnoki added urgency-high Please check first size-medium A medium sized PR. This can be reviewed and merged in a moderate amount of time. labels Nov 14, 2024
Copy link
Collaborator

@CRBl69 CRBl69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small readability change request. Once accepted, and you checked that it works, feel free to merge.

Co-authored-by: Bogdan Crisan <[email protected]>
@xbtmatt xbtmatt enabled auto-merge (squash) November 14, 2024 18:36
@xbtmatt xbtmatt merged commit c6bb54a into main Nov 14, 2024
6 of 7 checks passed
@xbtmatt xbtmatt deleted the ECO-2389 branch November 14, 2024 18:44
xbtmatt added a commit that referenced this pull request Nov 15, 2024
xbtmatt added a commit that referenced this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size-medium A medium sized PR. This can be reviewed and merged in a moderate amount of time. urgency-high Please check first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants