Fixed click on project after project creation

This commit is contained in:
Jesús Espino 2016-12-22 11:41:04 +01:00
parent 0424315849
commit a3586cb3aa

View file

@ -159,14 +159,18 @@
(defrecord CreateProject [name width height layout] (defrecord CreateProject [name width height layout]
ptk/WatchEvent ptk/WatchEvent
(watch [this state s] (watch [this state s]
(letfn [(on-success [{project :payload}] (letfn [(on-finish [{project :payload}]
(rx/of (rx/of (fetch-projects)))
(project-persisted project) (on-success [{project :payload}]
(udp/create-page {:width width (->> (rp/req :create/page
:height height {:name name
:layout layout :project (:id project)
:project (:id project) :data {}
:name "Page 1" })))] :metadata {:width width
:height height
:layout layout
:order 0}})
(rx/mapcat on-finish)))]
(->> (rp/req :create/project {:name name}) (->> (rp/req :create/project {:name name})
(rx/mapcat on-success))))) (rx/mapcat on-success)))))