mirror of
https://github.com/penpot/penpot.git
synced 2025-03-15 17:21:17 -05:00
:fix: react warning duplicate keys
This commit is contained in:
parent
f2fd380979
commit
4b2d82e100
3 changed files with 12 additions and 9 deletions
|
@ -113,9 +113,10 @@
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[props]
|
[props]
|
||||||
|
|
||||||
(let [childs (unchecked-get props "childs")]
|
(let [childs (unchecked-get props "childs")]
|
||||||
[:> frame-container props
|
[:> frame-container props
|
||||||
[:g.frame-children
|
[:g.frame-children
|
||||||
(for [item childs]
|
(for [item childs]
|
||||||
[:& shape-wrapper {:key (dm/str (:id item)) :shape item}])]])))
|
[:& shape-wrapper {:key (dm/str (:id item)) :shape item}]
|
||||||
|
)]])))
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
type (if (= (count shapes) 1) (-> shapes first :type) :multiple)
|
type (if (= (count shapes) 1) (-> shapes first :type) :multiple)
|
||||||
options (type->options type)]
|
options (type->options type)]
|
||||||
[:div.element-options
|
[:div.element-options
|
||||||
(for [option options]
|
(for [[idx option] (map-indexed vector options)]
|
||||||
[:> (case option
|
[:> (case option
|
||||||
:layout layout-panel
|
:layout layout-panel
|
||||||
:layout-flex layout-flex-panel
|
:layout-flex layout-flex-panel
|
||||||
|
@ -51,7 +51,8 @@
|
||||||
:image image-panel
|
:image image-panel
|
||||||
:text text-panel
|
:text text-panel
|
||||||
:svg svg-panel)
|
:svg svg-panel)
|
||||||
{:shapes shapes
|
{:key idx
|
||||||
|
:shapes shapes
|
||||||
:frame frame
|
:frame frame
|
||||||
:from from}])
|
:from from}])
|
||||||
[:& exports
|
[:& exports
|
||||||
|
|
|
@ -106,9 +106,9 @@
|
||||||
[:& copy-button {:data (copy-style-data style)}]])
|
[:& copy-button {:data (copy-style-data style)}]])
|
||||||
|
|
||||||
(when (:fills style)
|
(when (:fills style)
|
||||||
(for [fill (:fills style)]
|
(for [[idx fill] (map-indexed vector (:fills style))]
|
||||||
|
[:& color-row {:key idx
|
||||||
[:& color-row {:format @color-format
|
:format @color-format
|
||||||
:color (shape->color fill)
|
:color (shape->color fill)
|
||||||
:copy-data (copy-style-data fill :fill-color :fill-color-gradient)
|
:copy-data (copy-style-data fill :fill-color :fill-color-gradient)
|
||||||
:on-change-format #(reset! color-format %)}]))
|
:on-change-format #(reset! color-format %)}]))
|
||||||
|
@ -175,8 +175,9 @@
|
||||||
(remove (fn [[_ text]] (str/empty? (str/trim text))))
|
(remove (fn [[_ text]] (str/empty? (str/trim text))))
|
||||||
(mapv (fn [[style text]] (vector (merge txt/default-text-attrs style) text))))]
|
(mapv (fn [[style text]] (vector (merge txt/default-text-attrs style) text))))]
|
||||||
|
|
||||||
(for [[_ [full-style text]] (map-indexed vector style-text-blocks)]
|
(for [[idx [full-style text]] (map-indexed vector style-text-blocks)]
|
||||||
[:& typography-block {:shape shape
|
[:& typography-block {:key idx
|
||||||
|
:shape shape
|
||||||
:style full-style
|
:style full-style
|
||||||
:text text}])))
|
:text text}])))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue