Commit 4afed289 authored by tom's avatar tom

[skip ci] fix link in TokenSelect

parent c31b7793
...@@ -5,6 +5,7 @@ import React from 'react'; ...@@ -5,6 +5,7 @@ import React from 'react';
import { route } from 'nextjs-routes'; import { route } from 'nextjs-routes';
import TokenEntity from 'ui/shared/entities/token/TokenEntity'; import TokenEntity from 'ui/shared/entities/token/TokenEntity';
import LinkInternal from 'ui/shared/LinkInternal';
import TruncatedValue from 'ui/shared/TruncatedValue'; import TruncatedValue from 'ui/shared/TruncatedValue';
import type { TokenEnhancedData } from '../utils/tokenUtils'; import type { TokenEnhancedData } from '../utils/tokenUtils';
...@@ -47,11 +48,10 @@ const TokenSelectItem = ({ data }: Props) => { ...@@ -47,11 +48,10 @@ const TokenSelectItem = ({ data }: Props) => {
} }
})(); })();
// TODO add filter param when token page is ready
const url = route({ pathname: '/token/[hash]', query: { hash: data.token.address } }); const url = route({ pathname: '/token/[hash]', query: { hash: data.token.address } });
return ( return (
<Flex <LinkInternal
px={ 1 } px={ 1 }
py="10px" py="10px"
display="flex" display="flex"
...@@ -62,9 +62,8 @@ const TokenSelectItem = ({ data }: Props) => { ...@@ -62,9 +62,8 @@ const TokenSelectItem = ({ data }: Props) => {
_hover={{ _hover={{
bgColor: useColorModeValue('blue.50', 'gray.800'), bgColor: useColorModeValue('blue.50', 'gray.800'),
}} }}
color="initial"
fontSize="sm" fontSize="sm"
cursor="pointer"
as="a"
href={ url } href={ url }
> >
<Flex alignItems="center" w="100%" overflow="hidden"> <Flex alignItems="center" w="100%" overflow="hidden">
...@@ -80,7 +79,7 @@ const TokenSelectItem = ({ data }: Props) => { ...@@ -80,7 +79,7 @@ const TokenSelectItem = ({ data }: Props) => {
<Flex alignItems="center" justifyContent="space-between" w="100%" whiteSpace="nowrap"> <Flex alignItems="center" justifyContent="space-between" w="100%" whiteSpace="nowrap">
{ secondRow } { secondRow }
</Flex> </Flex>
</Flex> </LinkInternal>
); );
}; };
......
...@@ -5,7 +5,6 @@ import NextLink from 'next/link'; ...@@ -5,7 +5,6 @@ import NextLink from 'next/link';
import type { LegacyRef } from 'react'; import type { LegacyRef } from 'react';
import React from 'react'; import React from 'react';
// NOTE! use this component only for links to pages that are completely implemented in new UI
const LinkInternal = ({ isLoading, ...props }: LinkProps & { isLoading?: boolean }, ref: LegacyRef<HTMLAnchorElement>) => { const LinkInternal = ({ isLoading, ...props }: LinkProps & { isLoading?: boolean }, ref: LegacyRef<HTMLAnchorElement>) => {
if (isLoading) { if (isLoading) {
return <Flex alignItems="center" { ...props as FlexProps }>{ props.children }</Flex>; return <Flex alignItems="center" { ...props as FlexProps }>{ props.children }</Flex>;
......
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