0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 18:48:37 -05:00

🐛 Add a workaround for duplicate ids.

This commit is contained in:
Andrey Antukh 2020-04-14 17:31:33 +02:00
parent c2ed39a36d
commit e240f14a37
2 changed files with 3 additions and 6 deletions

View file

@ -315,8 +315,6 @@
(-> (l/in [:library :last-deleted-library])
(l/derived st/state =)))
(defonce counter (atom 0))
(mf/defc library-page
[{:keys [team-id library-id section]}]
(let [state (mf/use-state {:selected #{}})
@ -333,7 +331,6 @@
last-deleted-library (mf/deref last-deleted-library-ref)
selected-library (first (filter #(= (:id %) library-id) libraries))
]
(mf/use-effect

View file

@ -11,6 +11,7 @@
(:require
[lentes.core :as l]
[rumext.alpha :as mf]
[uxbox.common.data :as d]
[uxbox.main.constants :as c]
[uxbox.main.data.workspace :as dw]
[uxbox.main.geom :as geom]
@ -128,11 +129,10 @@
:id (str "shape-" id)
:width width
:height height}))]
[:svg {:x x :y y :width width :height height}
[:> "rect" props]
(for [item childs]
(for [[i item] (d/enumerate childs)]
[:& shape-wrapper {:frame shape
:shape item
:key (:id item)}])])))
:key (str i (:id item))}])])))