mirror of
https://github.com/penpot/penpot.git
synced 2026-09-08 13:09:22 +00:00
Proper state cleaning on login also.
This commit is contained in:
parent
d1fee179d5
commit
0a736994db
@ -45,6 +45,10 @@
|
|||||||
;; --- Login
|
;; --- Login
|
||||||
|
|
||||||
(defrecord Login [username password]
|
(defrecord Login [username password]
|
||||||
|
rs/UpdateEvent
|
||||||
|
(-apply-update [_ state]
|
||||||
|
(merge state (dissoc (st/get-initial-state) :route)))
|
||||||
|
|
||||||
rs/WatchEvent
|
rs/WatchEvent
|
||||||
(-apply-watch [this state s]
|
(-apply-watch [this state s]
|
||||||
(letfn [(on-error [err]
|
(letfn [(on-error [err]
|
||||||
@ -74,7 +78,7 @@
|
|||||||
(defrecord Logout []
|
(defrecord Logout []
|
||||||
rs/UpdateEvent
|
rs/UpdateEvent
|
||||||
(-apply-update [_ state]
|
(-apply-update [_ state]
|
||||||
(st/get-initial-state))
|
(merge state (dissoc (st/get-initial-state) :route)))
|
||||||
|
|
||||||
rs/WatchEvent
|
rs/WatchEvent
|
||||||
(-apply-watch [_ state s]
|
(-apply-watch [_ state s]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user