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

Error using as={Link} prop with when using createSharedPathnamesNavigation #1065

Closed
3 tasks done
RubenGuerrero opened this issue May 10, 2024 · 1 comment
Closed
3 tasks done
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@RubenGuerrero
Copy link

Description

I'm getting an error when passing the Link component as a prop to the NextUI library.

navigation.ts

export const { Link, redirect, usePathname, useRouter } =
  createSharedPathnamesNavigation({ locales, localePrefix });
import { Link } from './navigation'; 
<Button as={Link} ...>

CleanShot 2024-05-10 at 22 29 47

If I do the same using the next/navigation Link component, it works perfectly.

Let me know if there is anything else I can add to fix the issue.

Verifications

  • I've verified that the problem I'm experiencing isn't covered in the docs.
  • I've searched for similar, existing issues on GitHub and Stack Overflow.
  • I've compared my app to a working example to look for differences.

Mandatory reproduction URL

N/A

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Click on …
  3. See error: …

Expected behaviour

I would expect the Link component to behave the same way as the original one.

@RubenGuerrero RubenGuerrero added bug Something isn't working unconfirmed Needs triage. labels May 10, 2024
@RubenGuerrero RubenGuerrero changed the title Using as={Link} prop with when using createSharedPathnamesNavigation Error using as={Link} prop with when using createSharedPathnamesNavigation May 10, 2024
@amannn
Copy link
Owner

amannn commented May 11, 2024

This is a duplicate of #319

@amannn amannn closed this as completed May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants