refactor from PR request
This commit is contained in:
@@ -155,7 +155,11 @@ export const BondedMixnode = ({
|
||||
{name}
|
||||
</Typography>
|
||||
)}
|
||||
<IdentityKey identityKey={identityKey} tooltipTitle={host} />
|
||||
<Tooltip title={host} placement="top" arrow>
|
||||
<Box width="fit-content">
|
||||
<IdentityKey identityKey={identityKey} />
|
||||
</Box>
|
||||
</Tooltip>
|
||||
</Stack>
|
||||
}
|
||||
Action={
|
||||
|
||||
@@ -3,13 +3,11 @@ import { Stack, Typography, Tooltip } from '@mui/material';
|
||||
import { CopyToClipboard } from '@nymproject/react/clipboard/CopyToClipboard';
|
||||
import { splice } from 'src/utils';
|
||||
|
||||
export const IdentityKey = ({ identityKey, tooltipTitle }: { identityKey: string; tooltipTitle?: string }) => (
|
||||
<Tooltip title={tooltipTitle || ''} placement="top" arrow>
|
||||
<Stack direction="row" width="fit-content">
|
||||
<Typography variant="body2" component="span" fontWeight={400} sx={{ mr: 1, color: 'text.primary' }}>
|
||||
{splice(6, identityKey)}
|
||||
</Typography>
|
||||
<CopyToClipboard value={identityKey} sx={{ fontSize: 18 }} />
|
||||
</Stack>
|
||||
</Tooltip>
|
||||
export const IdentityKey = ({ identityKey }: { identityKey: string }) => (
|
||||
<Stack direction="row" width="fit-content">
|
||||
<Typography variant="body2" component="span" fontWeight={400} sx={{ mr: 1, color: 'text.primary' }}>
|
||||
{splice(6, identityKey)}
|
||||
</Typography>
|
||||
<CopyToClipboard value={identityKey} sx={{ fontSize: 18 }} />
|
||||
</Stack>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user