Tidyup of unused database keys and subscription handlers

This commit is contained in:
Simon Brooke 2020-01-29 19:39:49 +00:00
parent c6751c1d83
commit 5ded76199f
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
4 changed files with 2 additions and 11 deletions

View file

@ -6,11 +6,9 @@
[re-frame.core :as rf]))
(defn local-uri? [{:keys [uri]}]
(js/console.log (str "local-uri?: received `" (str uri) "` (type " (type uri) ") as uri"))
(not (re-find #"^\w+?://" (str uri))))
(defn default-headers [request]
(js/console.log (str "default-headers: received `" request "` as request"))
(if (local-uri? request)
(-> request
(update :headers #(merge {"x-csrf-token" js/csrfToken} %)))

View file

@ -38,6 +38,4 @@
"Other-key-customers"
"Power-supplier"} ;; need to be fetched from server side
:latitude 56
:longitude -4
:map {:map-centre [56 -4]
:map-zoom 6}})
:longitude -4})

View file

@ -198,11 +198,6 @@
(js/console.log (str "Fetching longitude" v))
v)))
(rf/reg-sub
:map
(fn [db _]
(:map db)))
(rf/reg-sub
:route
(fn [db _]

View file

@ -83,7 +83,7 @@
(defn map-render
"Render the actual div containing the map."
[]
[:div#map {:style {:height "1000px"}}])
[:div#map {:style {:height "800px"}}])
(defn panel
"A reagent class for the map object."