Show error notificaton on oidc error redirect

This commit is contained in:
Andrey Antukh 2024-03-26 13:39:24 +01:00 committed by Andrés Moya
parent 81b52d7170
commit fd92437f7d
5 changed files with 47 additions and 3 deletions

View file

@ -9,6 +9,8 @@
(:require
[app.common.data.macros :as dm]
[app.config :as cf]
[app.main.data.users :as du]
[app.main.store :as st]
[app.main.ui.auth.login :refer [login-page]]
[app.main.ui.auth.recovery :refer [recovery-page]]
[app.main.ui.auth.recovery-request :refer [recovery-request-page]]
@ -42,11 +44,16 @@
{::mf/props :obj}
[{:keys [route]}]
(let [section (dm/get-in route [:data :name])
params (:query-params route)]
params (:query-params route)
error (:error params)]
(mf/with-effect []
(dom/set-html-title (tr "title.default")))
(mf/with-effect [error]
(when error
(st/emit! (du/show-redirect-error error))))
[:main {:class (stl/css :auth-section)}
[:a {:href "#/" :class (stl/css :logo-btn)} i/logo]
[:div {:class (stl/css :login-illustration)}