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