mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 14:11:40 +02:00
Proper state cleaning on login also.
This commit is contained in:
parent
d1fee179d5
commit
0a736994db
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue