Commit ad7d2fee authored by tom's avatar tom

small fixes and use the component for other tags

parent 49aae708
...@@ -19,7 +19,7 @@ const PrivateTags: React.FC = () => { ...@@ -19,7 +19,7 @@ const PrivateTags: React.FC = () => {
<Page> <Page>
<Box h="100%"> <Box h="100%">
<Heading as="h1" size="lg" marginBottom={ 8 }>Private tags</Heading> <Heading as="h1" size="lg" marginBottom={ 8 }>Private tags</Heading>
<Tabs variant="soft-rounded" colorScheme="blue"> <Tabs variant="soft-rounded" colorScheme="blue" isLazy>
<TabList marginBottom={ 8 }> <TabList marginBottom={ 8 }>
<Tab>Address</Tab> <Tab>Address</Tab>
<Tab>Transaction</Tab> <Tab>Transaction</Tab>
......
...@@ -33,9 +33,7 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => { ...@@ -33,9 +33,7 @@ const AddressTagTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
return ( return (
<Tr alignItems="top" key={ item.transaction }> <Tr alignItems="top" key={ item.transaction }>
<Td> <Td>
<HStack spacing={ 4 }> <AddressLinkWithTooltip address={ item.transaction }/>
<AddressLinkWithTooltip address={ item.transaction }/>
</HStack>
</Td> </Td>
<Td> <Td>
<Tooltip label={ item.tag }> <Tooltip label={ item.tag }>
......
...@@ -21,4 +21,4 @@ const AddressLinkWithTooltip = ({ address }: {address: string}) => { ...@@ -21,4 +21,4 @@ const AddressLinkWithTooltip = ({ address }: {address: string}) => {
) )
} }
export default AddressLinkWithTooltip; export default React.memo(AddressLinkWithTooltip);
...@@ -6,11 +6,11 @@ import { ...@@ -6,11 +6,11 @@ import {
Td, Td,
Switch, Switch,
HStack, HStack,
Tooltip,
} from '@chakra-ui/react' } from '@chakra-ui/react'
import EditButton from 'ui/shared/EditButton'; import EditButton from 'ui/shared/EditButton';
import DeleteButton from 'ui/shared/DeleteButton'; import DeleteButton from 'ui/shared/DeleteButton';
import TruncatedTextTooltip from 'ui/shared/TruncatedTextTooltip';
import type { TWatchlistItem } from 'data/watchlist'; import type { TWatchlistItem } from 'data/watchlist';
...@@ -35,11 +35,11 @@ const WatchlistTableItem = ({ item, onEditClick, onDeleteClick }: Props) => { ...@@ -35,11 +35,11 @@ const WatchlistTableItem = ({ item, onEditClick, onDeleteClick }: Props) => {
<Tr alignItems="top" key={ item.address }> <Tr alignItems="top" key={ item.address }>
<Td><WatchListAddressItem item={ item }/></Td> <Td><WatchListAddressItem item={ item }/></Td>
<Td> <Td>
<Tooltip label={ item.tag }> <TruncatedTextTooltip label={ item.tag }>
<Tag variant="gray" lineHeight="24px"> <Tag variant="gray" lineHeight="24px">
{ item.tag } { item.tag }
</Tag> </Tag>
</Tooltip> </TruncatedTextTooltip>
</Td> </Td>
<Td><Switch colorScheme="blue" size="md" isChecked={ item.notification }/></Td> <Td><Switch colorScheme="blue" size="md" isChecked={ item.notification }/></Td>
<Td> <Td>
......
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