Skip to content

Commit

Permalink
chore: minor refactor #2025
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-mihok authored and mturoci committed Sep 6, 2023
1 parent 9582558 commit bfa5afd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ui/src/copyable_text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,7 @@ export const ClipboardCopyButton = ({ value, anchorElement, showOnHoverOnly = fa

React.useEffect(() => {
if (!anchorElement) return
if (portal) {
ReactDOM.render(
ReactDOM.createPortal(CopyButton, anchorElement),
btnContainerRef.current
)
}
if (portal) ReactDOM.render(ReactDOM.createPortal(CopyButton, anchorElement), btnContainerRef.current)
if (showOnHoverOnly) anchorElement.classList.add(css.hover)
}, [CopyButton, anchorElement, portal, showOnHoverOnly])

Expand Down

0 comments on commit bfa5afd

Please sign in to comment.