made it possible to change layouts.
This commit is contained in:
14
src/cljs/auto_ap/history.cljs
Normal file
14
src/cljs/auto_ap/history.cljs
Normal file
@@ -0,0 +1,14 @@
|
||||
(ns auto-ap.pushy
|
||||
(:require [bidi.bidi :as bidi]
|
||||
[pushy.core :as pushy]
|
||||
[auto-ap.routes :as routes]
|
||||
[re-frame.core :as re-frame]))
|
||||
|
||||
(defn- parse-url [url]
|
||||
(bidi/match-route routes/routes url))
|
||||
|
||||
(defn- dispatch-route [matched-route]
|
||||
(re-frame/dispatch [:auto-ap.events/set-active-page (:handler matched-route)]))
|
||||
|
||||
|
||||
(def history (pushy/pushy dispatch-route parse-url))
|
||||
Reference in New Issue
Block a user