mirror of
https://github.com/penpot/penpot.git
synced 2025-06-10 13:21:41 +02:00
🐛 Add a workaround for duplicate ids.
This commit is contained in:
parent
c2ed39a36d
commit
e240f14a37
2 changed files with 3 additions and 6 deletions
|
@ -315,8 +315,6 @@
|
||||||
(-> (l/in [:library :last-deleted-library])
|
(-> (l/in [:library :last-deleted-library])
|
||||||
(l/derived st/state =)))
|
(l/derived st/state =)))
|
||||||
|
|
||||||
(defonce counter (atom 0))
|
|
||||||
|
|
||||||
(mf/defc library-page
|
(mf/defc library-page
|
||||||
[{:keys [team-id library-id section]}]
|
[{:keys [team-id library-id section]}]
|
||||||
(let [state (mf/use-state {:selected #{}})
|
(let [state (mf/use-state {:selected #{}})
|
||||||
|
@ -333,7 +331,6 @@
|
||||||
|
|
||||||
last-deleted-library (mf/deref last-deleted-library-ref)
|
last-deleted-library (mf/deref last-deleted-library-ref)
|
||||||
selected-library (first (filter #(= (:id %) library-id) libraries))
|
selected-library (first (filter #(= (:id %) library-id) libraries))
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
(mf/use-effect
|
(mf/use-effect
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
(:require
|
(:require
|
||||||
[lentes.core :as l]
|
[lentes.core :as l]
|
||||||
[rumext.alpha :as mf]
|
[rumext.alpha :as mf]
|
||||||
|
[uxbox.common.data :as d]
|
||||||
[uxbox.main.constants :as c]
|
[uxbox.main.constants :as c]
|
||||||
[uxbox.main.data.workspace :as dw]
|
[uxbox.main.data.workspace :as dw]
|
||||||
[uxbox.main.geom :as geom]
|
[uxbox.main.geom :as geom]
|
||||||
|
@ -128,11 +129,10 @@
|
||||||
:id (str "shape-" id)
|
:id (str "shape-" id)
|
||||||
:width width
|
:width width
|
||||||
:height height}))]
|
:height height}))]
|
||||||
|
|
||||||
[:svg {:x x :y y :width width :height height}
|
[:svg {:x x :y y :width width :height height}
|
||||||
[:> "rect" props]
|
[:> "rect" props]
|
||||||
(for [item childs]
|
(for [[i item] (d/enumerate childs)]
|
||||||
[:& shape-wrapper {:frame shape
|
[:& shape-wrapper {:frame shape
|
||||||
:shape item
|
:shape item
|
||||||
:key (:id item)}])])))
|
:key (str i (:id item))}])])))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue