mirror of
https://github.com/penpot/penpot.git
synced 2025-08-27 19:26:32 +02:00
🐛 Fix several SVG upload issues
This commit is contained in:
parent
b6b2a3ec53
commit
4f09688af7
8 changed files with 63 additions and 28 deletions
frontend/src/app/main/ui
|
@ -215,11 +215,15 @@
|
|||
([stream on-subscribe]
|
||||
(use-stream stream (mf/deps) on-subscribe))
|
||||
([stream deps on-subscribe]
|
||||
(use-stream stream deps on-subscribe nil))
|
||||
([stream deps on-subscribe on-dispose]
|
||||
(mf/use-effect
|
||||
deps
|
||||
(fn []
|
||||
(let [sub (->> stream (rx/subs! on-subscribe))]
|
||||
#(rx/dispose! sub))))))
|
||||
#(do
|
||||
(rx/dispose! sub)
|
||||
(when on-dispose (on-dispose))))))))
|
||||
|
||||
;; https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
|
||||
(defn use-previous
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue