mirror of
https://github.com/penpot/penpot.git
synced 2025-04-16 17:01:33 -05:00
Minor changes on router.
This commit is contained in:
parent
fd6395fcd4
commit
411e6e4cff
1 changed files with 1 additions and 13 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
(enable-console-print!)
|
||||
|
||||
(declare +router+)
|
||||
(def +router+ nil)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Events
|
||||
|
@ -15,12 +15,6 @@
|
|||
(defn update-location
|
||||
[{:keys [handler route-params] :as params}]
|
||||
(reify
|
||||
IPrintWithWriter
|
||||
(-pr-writer [mv writer x]
|
||||
(-write writer "#<event:router/update-location ")
|
||||
(-pr-writer params writer x)
|
||||
(-write writer ">"))
|
||||
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(merge state
|
||||
|
@ -33,10 +27,6 @@
|
|||
([name params]
|
||||
{:pre [(keyword? name)]}
|
||||
(reify
|
||||
IPrintWithWriter
|
||||
(-pr-writer [mv writer _]
|
||||
(-write writer "#<event:router/navigate>"))
|
||||
|
||||
rs/EffectEvent
|
||||
(-apply-effect [_ state]
|
||||
(let [loc (merge {:handler name}
|
||||
|
@ -61,8 +51,6 @@
|
|||
["colors" :dashboard/colors]]]
|
||||
["workspace/" [[page-route :workspace/page]]]]])
|
||||
|
||||
(def ^:static ^:private +router+ nil)
|
||||
|
||||
(defn init
|
||||
[]
|
||||
(let [opts {:on-navigate #(rs/emit! (update-location %))
|
||||
|
|
Loading…
Add table
Reference in a new issue