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

calling navigate with relative path url "../newpath" appends to current url #502

Open
chiefcll opened this issue Dec 10, 2024 · 3 comments

Comments

@chiefcll
Copy link

Describe the bug

Given I'm on a page
/show/home/fiction/333

and I call
const navigate = useNavigate();
navigate("../similar/333")

It redirects to /show/home/fiction/333/../similar/333

Your Example Website or App

None

Steps to Reproduce the Bug or Issue

Described above

Expected behavior

Expecting Router to support relative paths
It should redirect to /show/home/similar/333

Screenshots or Videos

No response

Platform

Mac + Chrome

Additional context

No response

@chiefcll
Copy link
Author

I assume it's not supported...

image

Doesn't look like this is doing any logic to check for ../ or ./

@ryansolid
Copy link
Member

Yeah we never implemented relative paths like that.

@chiefcll
Copy link
Author

Are you planning on supporting this or should I go with absolute paths?

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

No branches or pull requests

2 participants