0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-12 15:01:28 -05:00

Add micro optimization to shape-container component

This commit is contained in:
Andrey Antukh 2023-09-05 12:21:58 +02:00
parent b158a82a84
commit d0a796124f

View file

@ -54,7 +54,7 @@
children (unchecked-get props "children")
pointer-events (unchecked-get props "pointer-events")
disable-shadows? (unchecked-get props "disable-shadows?")
shape-id (:id shape)
shape-id (dm/get-prop shape :id)
preview-blend-mode-ref
(mf/with-memo [shape-id] (refs/workspace-preview-blend-by-id shape-id))
@ -62,7 +62,7 @@
blend-mode (-> (mf/deref preview-blend-mode-ref)
(or (:blend-mode shape)))
type (:type shape)
type (dm/get-prop shape :type)
render-id (mf/use-id)
filter-id (dm/str "filter_" render-id)
styles (-> (obj/create)