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

Use pathCreator in env page #1033

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Use pathCreator in env page #1033

wants to merge 4 commits into from

Conversation

goodoldneon
Copy link
Contributor

@goodoldneon goodoldneon commented Jan 18, 2024

Description

On that env page, replace all href template literals with pathCreator methods

Type of change (choose one)

  • Chore (refactors, upgrades, etc.)
  • Bug fix (non-breaking change that fixes an issue)
  • Security fix (non-breaking change that fixes a potential vulnerability)
  • Docs
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Checklist

  • I've linked any associated issues to this PR.
  • I've tested my own changes.

Check our Pull Request Guidelines

Copy link

vercel bot commented Jan 18, 2024

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

Name Status Preview Comments Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 9, 2024 7:03pm

Copy link
Contributor

@IGassmann IGassmann left a comment

Choose a reason for hiding this comment

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

@goodoldneon, what do you think of using https://github.com/lukemorales/next-safe-navigation instead?

I played with it a bit, and it worked great! It also handles search params nicely.

We can still use encodeURIComponent on it with Zod.

It's maintained by one of the WorkOS devs.

@goodoldneon
Copy link
Contributor Author

@goodoldneon, what do you think of using https://github.com/lukemorales/next-safe-navigation instead?

Looks good at a glance! I don't have a preference about what what we use, so long as:

  • We aren't hardcoding paths throughout the app
  • URL encoding is implicit

@goodoldneon
Copy link
Contributor Author

After thinking about it a little more, it seems like overkill to add a dependency for the URLs. The existing pathCreator seems fine for this simple use case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants