near / near-discovery

The homebase for Near Builders
https://dev.near.org
The Unlicense
48 stars 71 forks source link

`Link` is broken the router #1158

Closed wpdas closed 3 months ago

wpdas commented 4 months ago

Describe the bug I'm facing an issue while using Link. It's working with all gateways except near.org. So, if I have this:

const Link = styled("Link")``;

return (
  <Link href="?path=feature-overview">
    Go to Feature Overview
  </Link>
);

When I hover or click, this is going to work as expected (except for near.org):

Screenshot 2024-05-06 at 14 23 00 https://near.social/alem-lib.near/widget/Index?path=feature-overview

And this is what I'm getting when using near.org:

Screenshot 2024-05-06 at 14 27 30

To Reproduce Steps to reproduce the behavior:

  1. Go to https://near.org/alem-lib.near/widget/Index
  2. Click on "Learn Além"
  3. See error

You can do the same using a diff gateway, and it's going to work, e.g.: https://near.social/alem-lib.near/widget/Index

Expected behavior Should render the path correctly.

Desktop (please complete the following information):

charleslavon commented 4 months ago

hey @wpdas Link is a gateway-defined custom element and the near.org implementation is a bit different than that of near.social. Are you able to add the path + the query params?

charleslavon commented 3 months ago

Re-opening because this seems to affect multiple apps on dev.near.org. See PotLock

charleslavon commented 3 months ago

hey @shelegdmitriy let's pull this into this week. What might need to change in our custom Link component to have parity with that of near.social?