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

feat: add slugify to select tab framework #11951

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

Conversation

halvaradop
Copy link
Contributor

@halvaradop halvaradop commented Oct 2, 2024

☕️ Reasoning

This pull request adds slugification for framework tabs, allowing the currently selected framework's name to appear in the URL. The framework is determined based on the button container, as there is no direct access to the selected button. Additionally, the Tabs component from nextra/components automatically updates the selected framework in localStorage under the authjs.codeTab.framework key, using the index from the items prop.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

📌 Resources

Copy link

vercel bot commented Oct 2, 2024

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

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2024 7:47pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Nov 30, 2024 7:47pm

Copy link

vercel bot commented Oct 2, 2024

@halvaradop is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

* @returns - A string parsed from the URL
*/
const parseParams = (url: string): string => {
let parsedUrl = url.toLowerCase().replaceAll(/[^a-zA-z]+/g, "-")

Check warning

Code scanning / CodeQL

Overly permissive regular expression range Medium documentation

Suspicious character range that overlaps with a-z in the same character class, and is equivalent to [A-Z\[\]^_`a-z].
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.

2 participants