diff --git a/packages/tldraw/src/lib/ui/components/DuplicateButton.tsx b/packages/tldraw/src/lib/ui/components/DuplicateButton.tsx index 4c69a9c59..81cadef13 100644 --- a/packages/tldraw/src/lib/ui/components/DuplicateButton.tsx +++ b/packages/tldraw/src/lib/ui/components/DuplicateButton.tsx @@ -1,4 +1,5 @@ import { track, useEditor } from '@tldraw/editor' +import { useRef } from 'react' import { useActions } from '../hooks/useActions' import { useTranslation } from '../hooks/useTranslation/useTranslation' import { Button } from './primitives/Button' @@ -9,6 +10,7 @@ export const DuplicateButton = track(function DuplicateButton() { const actions = useActions() const msg = useTranslation() const action = actions['duplicate'] + const ref = useRef(null) return (