Skip to content

Commit fb0d440

Browse files
authored
fix: hover title (#9563)
1 parent f343284 commit fb0d440

File tree

1 file changed

+6
-7
lines changed
  • packages/mask/src/extension/options-page/DashboardComponents/CollectibleList

1 file changed

+6
-7
lines changed

packages/mask/src/extension/options-page/DashboardComponents/CollectibleList/CollectibleList.tsx

+6-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { useWeb3State } from '@masknet/web3-hooks-base'
33
import type { Web3Helper } from '@masknet/web3-helpers'
44
import type { NetworkPluginID } from '@masknet/shared-base'
55
import { SourceType } from '@masknet/web3-shared-base'
6-
import { Box, Button, Tooltip, Typography } from '@mui/material'
7-
import { makeStyles } from '@masknet/theme'
6+
import { Box, Button, Typography } from '@mui/material'
7+
import { ShadowRootTooltip, makeStyles } from '@masknet/theme'
88
import { useI18N } from '../../../../utils/index.js'
99
import { type ChangeEventOptions, CollectibleItem, type SelectableProps } from './CollectibleItem.js'
1010
import { CollectibleListContext } from './CollectibleListContext.js'
@@ -122,20 +122,19 @@ export function CollectibleList(props: CollectibleListProps) {
122122
) : (
123123
<Box className={classes.root}>
124124
{collectibles.map((token, index) => {
125-
const name = token.collection?.name || token.contract?.name
125+
const name = token.metadata?.name
126126
const uiTokenId = Others?.formatTokenId(token.tokenId, 4) ?? `#${token.tokenId}`
127-
const title = name ? `${name} ${uiTokenId}` : token.metadata?.name ?? ''
127+
const title = `${name || token.collection?.name || token.contract?.name} ${uiTokenId}`
128128
const collectibleKey = getCollectibleKey(token)
129129
const checked = selectable ? value?.includes(collectibleKey) : false
130130
const inactive = value ? !!value?.length && !checked : false
131131
return (
132-
<Tooltip
132+
<ShadowRootTooltip
133133
key={index}
134134
title={title}
135135
placement="top"
136136
disableInteractive
137137
PopperProps={{
138-
disablePortal: true,
139138
placement: 'top',
140139
popperOptions: {
141140
strategy: 'absolute',
@@ -166,7 +165,7 @@ export function CollectibleList(props: CollectibleListProps) {
166165
value={collectibleKey}
167166
onChange={handleItemChange}
168167
/>
169-
</Tooltip>
168+
</ShadowRootTooltip>
170169
)
171170
})}
172171
</Box>

0 commit comments

Comments
 (0)