mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 19:56:15 +02:00
Fixed click on project after project creation
This commit is contained in:
parent
0424315849
commit
a3586cb3aa
1 changed files with 12 additions and 8 deletions
|
@ -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)))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue