mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-04-21 23:47:58 +00:00
Update Beachball.tsx to remove duplication in strict mode (#840)
in strict mode the beachball gets rendered twice
This commit is contained in:
@@ -10,9 +10,12 @@ import { beachballIcon } from '@polkadot/ui-shared';
|
||||
function Identicon ({ address, className = '', size, style = {} }: Props): React.ReactElement<Props> {
|
||||
const updateElem = useCallback(
|
||||
(node: HTMLDivElement): void => {
|
||||
node?.appendChild(
|
||||
beachballIcon(address, { isAlternative: false, size })
|
||||
);
|
||||
if (node) {
|
||||
node.innerHTML = '';
|
||||
node.appendChild(
|
||||
beachballIcon(address, { isAlternative: false, size })
|
||||
);
|
||||
}
|
||||
},
|
||||
[address, size]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user