It looks okay now.

This commit is contained in:
Bryce Covert
2017-12-07 15:25:39 -08:00
parent 5b578c11e8
commit 505ccfba8e
10 changed files with 180 additions and 98 deletions

View File

@@ -1,11 +1,19 @@
(ns auto-ap.events
(:require [re-frame.core :as re-frame]
[auto-ap.db :as db]))
[auto-ap.db :as db]
[auto-ap.routes :as routes]
[bidi.bidi :as bidi]))
(re-frame/reg-event-db
::initialize-db
(fn [_ _]
db/default-db))
(assoc db/default-db
:active-page (:handler (bidi/match-route routes/routes (.. js/window -location -pathname))))))
(re-frame/reg-event-db
::set-active-page
(fn [db [_ active-page]]
(assoc db :active-page active-page)))
(re-frame/reg-event-db
::imported-invoices