starting to break out into separate folders.

This commit is contained in:
Bryce Covert
2018-04-05 10:55:07 -07:00
parent 1045514916
commit 2e827e1313
6 changed files with 60 additions and 50 deletions

View File

@@ -1,4 +1,5 @@
(ns auto-ap.views.utils)
(ns auto-ap.views.utils
(:require [re-frame.core :as re-frame]))
(defn active-when= [active-page candidate]
(when (= active-page candidate) " active"))
@@ -7,3 +8,7 @@
(let [client-id "264081895820-0nndcfo3pbtqf30sro82vgq5r27h8736.apps.googleusercontent.com"
redirect-uri (js/encodeURI (str (.-origin (.-location js/window)) "/api/oauth"))]
(str "https://accounts.google.com/o/oauth2/auth?access_type=online&client_id=" client-id "&redirect_uri=" redirect-uri "&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile")))
(defn dispatch-value-change [event]
(fn [e]
(re-frame/dispatch (conj event (.. e -target -value)))))