Commit 5020e8c2 authored by tom's avatar tom

fix next/link

parent c271d6ff
......@@ -83,7 +83,7 @@ const TokenSelect = ({ onClick }: Props) => {
}
<Tooltip label="Show all tokens">
<Box>
<NextLink href={{ pathname: '/address/[hash]', query: { hash: addressHash, tab: 'tokens' } }} passHref>
<NextLink href={{ pathname: '/address/[hash]', query: { hash: addressHash, tab: 'tokens' } }} passHref legacyBehavior>
<IconButton
aria-label="Show all tokens"
variant="outline"
......
......@@ -15,7 +15,7 @@ const AppLink = ({ url, external, id, title }: Props) => {
{ title }
</LinkOverlay>
) : (
<NextLink href={{ pathname: '/apps/[id]', query: { id } }} passHref>
<NextLink href={{ pathname: '/apps/[id]', query: { id } }} passHref legacyBehavior>
<LinkOverlay>
{ title }
</LinkOverlay>
......
......@@ -27,7 +27,7 @@ const AppModalLink = ({ url, external, id }: Props) => {
{ ...buttonProps }
>Launch app</Button>
) : (
<NextLink href={{ pathname: '/apps/[id]', query: { id } }} passHref>
<NextLink href={{ pathname: '/apps/[id]', query: { id } }} passHref legacyBehavior>
<Button
as="a"
{ ...buttonProps }
......
......@@ -12,7 +12,7 @@ const LinkInternal = (props: LinkProps, ref: LegacyRef<HTMLAnchorElement>) => {
}
return (
<NextLink href={ props.href as NextLinkProps['href'] } passHref target={ props.target }>
<NextLink href={ props.href as NextLinkProps['href'] } passHref target={ props.target } legacyBehavior>
<Link { ...props } ref={ ref }/>
</NextLink>
);
......
......@@ -71,7 +71,7 @@ const NavLink = ({ item, isCollapsed, px, className }: Props) => {
{ /* why not NextLink in all cases? since prev UI and new one are hosting in the same domain and global routing is managed by nginx */ }
{ /* we have to hard reload page on every transition between urls from different part of the app */ }
{ isInternalItem(item) && item.isNewUi ? (
<NextLink href={ item.nextRoute } passHref>
<NextLink href={ item.nextRoute } passHref legacyBehavior>
{ content }
</NextLink>
) : content }
......
......@@ -26,7 +26,7 @@ const NFTItem = ({ item }: Props) => {
fontWeight={ 500 }
lineHeight="20px"
>
<NextLink href={{ pathname: '/token/[hash]/instance/[id]', query: { hash: item.token.address, id: item.id } }} passHref>
<NextLink href={{ pathname: '/token/[hash]/instance/[id]', query: { hash: item.token.address, id: item.id } }} passHref legacyBehavior>
<LinkOverlay>
<NftMedia
mb="18px"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment