made typeaheads less bad and turned off matching

This commit is contained in:
Bryce Covert
2021-05-13 16:59:35 -07:00
parent 4c764ed927
commit 34d723677d
4 changed files with 14 additions and 5 deletions

View File

@@ -45,6 +45,12 @@
(fn [{:keys [db]} [_ token]]
(let [handler (:handler (bidi/match-route routes/routes (.. js/window -location -pathname)))]
(cond
(= :login handler)
{:db (assoc db/default-db
:active-page :login
:last-client-id (.getItem js/localStorage "last-client-id")
:user nil)}
(and (not= :login handler) (not token))
{:redirect "/login"
:db (assoc db/default-db