0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-10 06:41:40 -05:00

Fix token position wrong, component gets rendered on user mount

This commit is contained in:
Florian Schroedl 2024-07-29 14:22:07 +02:00
parent 1633f8035e
commit 6fc370bb30

View file

@ -311,6 +311,7 @@
token-id (:token-id mdata) token-id (:token-id mdata)
token (get (mf/deref refs/workspace-tokens) token-id)] token (get (mf/deref refs/workspace-tokens) token-id)]
(mf/use-effect (mf/use-effect
(mf/deps mdata)
(fn [] (fn []
(when-let [node (mf/ref-val dropdown-ref)] (when-let [node (mf/ref-val dropdown-ref)]
(reset! width (.-offsetWidth node))))) (reset! width (.-offsetWidth node)))))