From 07a5d95e4ce871fc7ecd4a1562e2ea35f06c3b5f Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Thu, 21 May 2020 21:31:33 +1000 Subject: [PATCH] Remove unused member in proxy token --- src/components/token/ProxyToken.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/token/ProxyToken.js b/src/components/token/ProxyToken.js index 07f85ea..d9419bf 100644 --- a/src/components/token/ProxyToken.js +++ b/src/components/token/ProxyToken.js @@ -24,7 +24,6 @@ function ProxyToken({ tokenClassName, onProxyDragEnd, tokens }) { const proxyContainer = usePortal("root"); const [imageSource, setImageSource] = useState(""); - const [tokenId, setTokenId] = useState(null); const proxyRef = useRef(); // Store the tokens in a ref and access in the interactjs loop @@ -42,12 +41,10 @@ function ProxyToken({ tokenClassName, onProxyDragEnd, tokens }) { listeners: { start: (event) => { let target = event.target; - const id = target.dataset.id; // Hide the token and copy it's image to the proxy target.parentElement.style.opacity = "0.25"; setImageSource(target.src); - setTokenId(id); let proxy = proxyRef.current; if (proxy) {