0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

Fix wrong state cleaning in logout.

This commit is contained in:
Andrey Antukh 2016-04-03 21:06:59 +03:00
parent ffc6c79ed7
commit d1fee179d5
2 changed files with 18 additions and 14 deletions

View file

@ -74,7 +74,7 @@
(defrecord Logout []
rs/UpdateEvent
(-apply-update [_ state]
(assoc state :auth nil))
(st/get-initial-state))
rs/WatchEvent
(-apply-watch [_ state s]

View file

@ -13,20 +13,24 @@
(defonce state (atom {}))
(defn get-initial-state
[]
{:dashboard {:project-order :name
:project-filter ""}
:route nil
:auth (:uxbox/auth local-storage)
:clipboard #queue []
:profile nil
:workspace nil
:shapes-by-id {}
:elements-by-id {}
:colors-by-id {}
:icons-by-id {}
:projects-by-id {}
:pages-by-id {}})
(defonce stream
(rs/init {:dashboard {:project-order :name
:project-filter ""}
:route nil
:auth (:uxbox/auth local-storage)
:clipboard #queue []
:profile nil
:workspace nil
:shapes-by-id {}
:elements-by-id {}
:colors-by-id {}
:icons-by-id {}
:projects-by-id {}
:pages-by-id {}}))
(rs/init (get-initial-state)))
(defn init
"Initialize the state materialization."