0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-16 01:31:22 -05:00

🐛 Fix swap components duplicates component

This commit is contained in:
Pablo Alba 2023-10-30 11:25:22 +01:00 committed by Andrey Antukh
parent 02399add7a
commit 0c1f6f8e71

View file

@ -151,6 +151,7 @@
[{:keys [item loop? shapes file-id root-shape container component-id] :as props}]
(let [on-select-component
(mf/use-fn
(mf/deps shapes file-id item)
#(when-not loop?
(st/emit! (dwl/component-multi-swap shapes file-id (:id item)))))
item-ref (mf/use-ref)