♻️ 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:
Dexterity 2026-06-24 04:24:53 -04:00 committed by GitHub
parent d757f96633
commit a530cf0dec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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