0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

🐛 Fix change page with wasm render

This commit is contained in:
Alejandro Alonso 2024-11-22 10:25:54 +01:00 committed by Belén Albeza
parent 361c56fd9c
commit 198339f232

View file

@ -275,7 +275,11 @@
preview-blend (-> refs/workspace-preview-blend
(mf/deref))]
(mf/with-effect []
;; NOTE: We need this page-id dependency to react to it and reset the
;; canvas, even though we are not using `page-id` inside the hook.
;; We think moving this out to a handler will make the render code
;; harder to follow through.
(mf/with-effect [page-id]
(when-let [canvas (mf/ref-val canvas-ref)]
(->> wasm.api/module
(p/fmap (fn [ready?]