[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant-backoffice] branch master updated: do not show error on
From: |
gnunet |
Subject: |
[taler-merchant-backoffice] branch master updated: do not show error on first login |
Date: |
Thu, 25 Feb 2021 23:08:50 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant-backoffice.
The following commit(s) were added to refs/heads/master by this push:
new 4612814 do not show error on first login
4612814 is described below
commit 4612814197db50c7e34763fee6b6568f87941559
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Feb 25 19:07:00 2021 -0300
do not show error on first login
---
packages/frontend/src/index.tsx | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/packages/frontend/src/index.tsx b/packages/frontend/src/index.tsx
index 3dd41a8..62e96f9 100644
--- a/packages/frontend/src/index.tsx
+++ b/packages/frontend/src/index.tsx
@@ -71,7 +71,7 @@ export default function Application(): VNode {
function ApplicationStatusRoutes(): VNode {
const { notifications, pushNotification, removeNotification } =
useNotifications()
- const { lang, setLang, changeBackend, updateToken } =
useContext(BackendContext)
+ const { lang, setLang, changeBackend, updateToken, token } =
useContext(BackendContext)
const backendConfig = useBackendConfig();
const i18n = useMessageTemplate()
@@ -84,10 +84,23 @@ function ApplicationStatusRoutes(): VNode {
const v = backendConfig.data?.currency + ' ' + backendConfig.data?.version
const ctx = useMemo(() => ({ currency: backendConfig.data?.currency || '',
version: backendConfig.data?.version || '' }), [v])
+ if (!token) {
+ return <div id="app">
+ <NavigationBar lang={lang} setLang={setLang} />
+ <LoginPage
+ onConfirm={(url: string, token?: string) => {
+ changeBackend(url)
+ if (token) updateToken(token)
+ route(RootPaths.list_instances)
+ }}
+ />
+ </div>
+ }
+
if (!backendConfig.data) {
if (!backendConfig.error) return <div class="is-loading"></div>
if (backendConfig.unauthorized) return <div class="asd">asd </div>
-
+
return <div id="app">
<NavigationBar lang={lang} setLang={setLang} />
<LoginPage
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant-backoffice] branch master updated: do not show error on first login,
gnunet <=