mirror of
https://github.com/penpot/penpot.git
synced 2025-08-01 16:18:33 +02:00
♻️ Refactor http client.
Start using Fetch API.
This commit is contained in:
parent
9a0f6018a7
commit
7d14aef393
15 changed files with 257 additions and 305 deletions
|
@ -147,8 +147,8 @@
|
|||
history (:history state)
|
||||
router (:router state)]
|
||||
(ts/schedule #(on-change router (.getToken ^js history)))
|
||||
(->> (rx/create (fn [sink]
|
||||
(let [key (e/listen history "navigate" (fn [o] (sink (.-token ^js o))))]
|
||||
(->> (rx/create (fn [subs]
|
||||
(let [key (e/listen history "navigate" (fn [o] (rx/push! subs (.-token ^js o))))]
|
||||
(fn []
|
||||
(bhistory/disable! history)
|
||||
(e/unlistenByKey key)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue