Next JS link is changing given url in href prop

Viewed 144

Currently, in my application, I am using the next/link and I am passing the href.

href= "https://www.google.com/maps/dir/?api=1&destination=4720%20S.%20Cottage%20Grove%20Avenue%20Chicago%20IL"

...
...

<Link href={href} as={as} scroll={false}>
      <ClickProxy>{children}</ClickProxy>
</Link>

For some reason when we click on the link in the web URL one slash '/' is missing you can look at the image.

enter image description here

1 Answers

Link is use for the website which you can manipulate. User can click the Link and pass to another page without reload. On the other hand, your href is from google, it must cause the reload. I think just using <a href="..."></a> is fine.

Related