diff --git a/components/Code/index.tsx b/components/Code/index.tsx index 1add62749..e489094cf 100644 --- a/components/Code/index.tsx +++ b/components/Code/index.tsx @@ -16,20 +16,20 @@ if (typeof window !== 'undefined') { function CopyCode({ codeRef, rootClass = 'rdmd-code-copy', className = '' }) { const copyClass = `${rootClass}_copied`; - const button = createRef(); + const buttonRef = createRef(); const copier = () => { const code = codeRef.current.textContent; if (copy(code)) { - const el = button.current; + const el = buttonRef.current; el.classList.add(copyClass); setTimeout(() => el.classList.remove(copyClass), 1500); } }; - return