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(www): remove unused icon from new-york mode-toggle button of NextJS Dark Mode #6575

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

Conversation

AjayPawarExist
Copy link

Description:

This PR fixes an issue in the New York style mode-toggle button for Dark Mode in Next.js (reference).
Screenshot 2025-02-05 at 22 55 41

Issue:

  • The New York style mode-toggle component had an extra unused icon from lucide-react, which caused errors when running npm run build.
  • Every time users downloaded the component, they encountered this error and had to manually remove the unused icon.
  • The default style does not have this issue—only the New York style is affected.

Fix:

  • Removed the unnecessary icon import from lucide-react, preventing the build error.
  • Ensured that the component works without manual fixes.

Files Modified:

  • apps/www/registry/new-york/examples/mode-toggle.tsx
Screenshot 2025-02-05 at 22 49 13 -> Screenshot 2025-02-05 at 22 50 11
  • apps/www/public/r/styles/new-york/mode-toggle.json
Screenshot 2025-02-05 at 22 50 35 -> Screenshot 2025-02-05 at 22 51 00

Additional Steps:

  • ✅ Ran pnpm build:registry to update the registry.
  • ✅ Verified that the default style is unaffected.
  • ✅ Passed all tests with pnpm test.
Screenshot 2025-02-05 at 22 32 32

This ensures a smooth experience for users downloading the New York mode-toggle component.

Let me know if any further changes are required. Thanks! 🚀

Copy link

vercel bot commented Feb 5, 2025

@AjayPawarExist is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant