Commit 5020e8c2 authored by tom's avatar tom

fix next/link

parent c271d6ff
...@@ -83,7 +83,7 @@ const TokenSelect = ({ onClick }: Props) => { ...@@ -83,7 +83,7 @@ const TokenSelect = ({ onClick }: Props) => {
} }
<Tooltip label="Show all tokens"> <Tooltip label="Show all tokens">
<Box> <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 <IconButton
aria-label="Show all tokens" aria-label="Show all tokens"
variant="outline" variant="outline"
......
...@@ -15,7 +15,7 @@ const AppLink = ({ url, external, id, title }: Props) => { ...@@ -15,7 +15,7 @@ const AppLink = ({ url, external, id, title }: Props) => {
{ title } { title }
</LinkOverlay> </LinkOverlay>
) : ( ) : (
<NextLink href={{ pathname: '/apps/[id]', query: { id } }} passHref> <NextLink href={{ pathname: '/apps/[id]', query: { id } }} passHref legacyBehavior>
<LinkOverlay> <LinkOverlay>
{ title } { title }
</LinkOverlay> </LinkOverlay>
......
...@@ -27,7 +27,7 @@ const AppModalLink = ({ url, external, id }: Props) => { ...@@ -27,7 +27,7 @@ const AppModalLink = ({ url, external, id }: Props) => {
{ ...buttonProps } { ...buttonProps }
>Launch app</Button> >Launch app</Button>
) : ( ) : (
<NextLink href={{ pathname: '/apps/[id]', query: { id } }} passHref> <NextLink href={{ pathname: '/apps/[id]', query: { id } }} passHref legacyBehavior>
<Button <Button
as="a" as="a"
{ ...buttonProps } { ...buttonProps }
......
...@@ -12,7 +12,7 @@ const LinkInternal = (props: LinkProps, ref: LegacyRef<HTMLAnchorElement>) => { ...@@ -12,7 +12,7 @@ const LinkInternal = (props: LinkProps, ref: LegacyRef<HTMLAnchorElement>) => {
} }
return ( 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 }/> <Link { ...props } ref={ ref }/>
</NextLink> </NextLink>
); );
......
...@@ -71,7 +71,7 @@ const NavLink = ({ item, isCollapsed, px, className }: Props) => { ...@@ -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 */ } { /* 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 */ } { /* we have to hard reload page on every transition between urls from different part of the app */ }
{ isInternalItem(item) && item.isNewUi ? ( { isInternalItem(item) && item.isNewUi ? (
<NextLink href={ item.nextRoute } passHref> <NextLink href={ item.nextRoute } passHref legacyBehavior>
{ content } { content }
</NextLink> </NextLink>
) : content } ) : content }
......
...@@ -26,7 +26,7 @@ const NFTItem = ({ item }: Props) => { ...@@ -26,7 +26,7 @@ const NFTItem = ({ item }: Props) => {
fontWeight={ 500 } fontWeight={ 500 }
lineHeight="20px" 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> <LinkOverlay>
<NftMedia <NftMedia
mb="18px" 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