mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
✨ Make the navigation async by default.
This leaves some time to eventloop to terminate other async events before navigate.
This commit is contained in:
parent
b2dc849e52
commit
cad2b831ed
1 changed files with 7 additions and 6 deletions
|
@ -84,12 +84,13 @@
|
||||||
|
|
||||||
ptk/EffectEvent
|
ptk/EffectEvent
|
||||||
(effect [_ state stream]
|
(effect [_ state stream]
|
||||||
(let [router (:router state)
|
(ts/asap
|
||||||
history (:history state)
|
#(let [router (:router state)
|
||||||
path (resolve router id params qparams)]
|
history (:history state)
|
||||||
(if ^boolean replace
|
path (resolve router id params qparams)]
|
||||||
(bhistory/replace-token! history path)
|
(if ^boolean replace
|
||||||
(bhistory/set-token! history path))))))
|
(bhistory/replace-token! history path)
|
||||||
|
(bhistory/set-token! history path)))))))
|
||||||
|
|
||||||
(defn nav
|
(defn nav
|
||||||
([id] (nav id nil nil))
|
([id] (nav id nil nil))
|
||||||
|
|
Loading…
Add table
Reference in a new issue