Skip to content

Commit 35bb4b6

Browse files
author
awb99
committed
notification bugfix
1 parent 190f46c commit 35bb4b6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/modular/oauth2/request.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
:oauth2/request-error
3737
(fn [{:keys [db]} [_ provider res]]
3838
(errorf "oauth2 provider: %s error: %s" provider res)
39-
(add-notification :error (str "request error " provider ": " (err-msg res)))
39+
(show-notification :error (str "request error " provider ": " (err-msg res)))
4040
{}))
4141

4242
(rf/reg-event-fx
4343
:oauth2/login-error
4444
(fn [{:keys [db]} [_ provider]]
4545
(errorf "oauth2 provider: %s error" provider)
46-
(add-notification :danger "oauth login error (token not received)")
46+
(show-notification :danger "oauth login error (token not received)")
4747
{}))
4848

src/modular/oauth2/user/login_dialog.cljs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[taoensso.timbre :refer-macros [info error]]
44
[reagent.core :as r]
55
[re-frame.core :as rf]
6-
[frontend.notifications.core :refer [add-notification]]))
6+
[frontend.notification :refer [show-notification]]))
77

88
(defn login-ui []
99
(let [username (r/atom "")
@@ -70,9 +70,9 @@
7070
(info "login result: " result)
7171
(rf/dispatch [:modal/close])
7272
(when error
73-
(add-notification :error error-message))
73+
(show-notification :error error-message))
7474
(when user
75-
(add-notification :info (str "Logged in as: " user)))
75+
(show-notification :info (str "Logged in as: " user)))
7676
(if user
7777
(assoc db :user result)
7878
db)))

0 commit comments

Comments
 (0)