logging in, and updating users, works.

This commit is contained in:
Bryce Covert
2018-05-22 14:18:11 -07:00
parent 3fee89f840
commit 61d586f377
6 changed files with 107 additions and 19 deletions

View File

@@ -4,14 +4,26 @@
[reagent.core :as reagent]
[auto-ap.subs :as subs]
[auto-ap.events :as events]
[auto-ap.views.utils :refer [login-url]]
[auto-ap.views.utils :refer [login-url dispatch-event]]
[cljs.reader :as edn]
[auto-ap.routes :as routes]
[bidi.bidi :as bidi]
[goog.string :as gstring]))
(re-frame/reg-event-fx
::relogin
(fn [{:keys [db]} _]
{
:db (assoc db :user nil)}
))
(defn needs-activation-page []
[:div
[:h2 "Sorry, your user is not activated yet. Please have Ben Skinner enable your account."]])
[:h2 "Sorry, your user is not activated yet. Please have Ben Skinner enable your account. Click "
[:a {:on-click (fn []
(re-frame/dispatch-sync [::relogin])
true)
:href login-url}
"here"]
" to try again."]])