mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 19:26:37 +02:00
Add navigation to dashboard.
This commit is contained in:
parent
feb00d83f8
commit
61b05613f3
4 changed files with 44 additions and 20 deletions
|
@ -57,8 +57,8 @@
|
|||
|
||||
(def ^:static
|
||||
routes ["/" [["auth/login" :auth/login]
|
||||
["auth/register" :auth/register]
|
||||
["auth/recover" :auth/recover-password]
|
||||
;; ["auth/register" :auth/register]
|
||||
;; ["auth/recover" :auth/recover-password]
|
||||
["dashboard/" [["projects" :dashboard/projects]
|
||||
["elements" :dashboard/elements]
|
||||
["icons" :dashboard/icons]
|
||||
|
@ -66,13 +66,10 @@
|
|||
["workspace/" [[project-route :main/project]
|
||||
[page-route :main/page]]]]])
|
||||
|
||||
(defn- on-navigate
|
||||
[data]
|
||||
(rs/emit! (update-location data)))
|
||||
|
||||
(defonce +router+
|
||||
(bidi.router/start-router! routes {:on-navigate on-navigate
|
||||
:default-location {:handler :auth/login}}))
|
||||
(let [opts {:on-navigate #(rs/emit! (update-location %))
|
||||
:default-location {:handler :dashboard/projects}}]
|
||||
(bidi.router/start-router! routes opts)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Public Api
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue