mirror of
https://github.com/penpot/penpot.git
synced 2026-06-26 09:12:06 +00:00
♻️ Migrate render-wasm api object-svg to modern component syntax (#9459)
* ♻️ Migrate render-wasm api object-svg to modern component syntax * 📎 Add minor changes Signed-off-by: Andrey Antukh <niwi@niwi.nz> --------- Signed-off-by: Andrey Antukh <niwi@niwi.nz> Co-authored-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
d757f96633
commit
a530cf0dec
@ -320,9 +320,8 @@
|
||||
(.postMessage (.-port2 ch) nil)))))
|
||||
|
||||
;; Based on app.main.render/object-svg
|
||||
(mf/defc object-svg
|
||||
{::mf/props :obj}
|
||||
[{:keys [shape] :as props}]
|
||||
(mf/defc object-svg*
|
||||
[{:keys [shape]}]
|
||||
(let [objects (mf/deref refs/workspace-page-objects)
|
||||
shape-wrapper
|
||||
(mf/with-memo [shape]
|
||||
@ -344,7 +343,7 @@
|
||||
(defn get-static-markup
|
||||
[shape]
|
||||
(->
|
||||
(mf/element object-svg #js {:shape shape})
|
||||
(mf/element object-svg* #js {:shape shape})
|
||||
(rds/renderToStaticMarkup)))
|
||||
|
||||
;; forward declare helpers so render can call them
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user