🐛 Fix incorrect redirect handling on request-access go-home button

This commit is contained in:
Andrey Antukh 2024-09-16 18:21:25 +02:00
parent 179d534237
commit 86c5ca4213
8 changed files with 182 additions and 109 deletions

View file

@ -760,8 +760,10 @@
(.back (.-history js/window)))
(defn reload-current-window
[]
(.reload (.-location js/window)))
([]
(.reload globals/location))
([force?]
(.reload globals/location force?)))
(defn scroll-by!
([element x y]

View file

@ -148,7 +148,17 @@
(defn nav-root
"Navigate to the root page."
[]
(set! (.-href globals/location) "/"))
(ptk/reify ::nav-root
ptk/EffectEvent
(effect [_ _ _]
(set! (.-href globals/location) "/"))))
(defn reload
[force?]
(ptk/reify ::reload
ptk/EffectEvent
(effect [_ _ _]
(ts/asap (partial dom/reload-current-window force?)))))
(defn nav-raw
[& {:keys [href uri]}]