diff options
author | Sebastian <sebasjm@gmail.com> | 2023-10-04 14:36:03 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-10-04 14:36:03 -0300 |
commit | 851b2da39c3297ede3d267f3d2534cac213261c1 (patch) | |
tree | 51ee03238cb7d87d21e57c0cdf245a0bc04681f0 /packages/merchant-backoffice-ui/src/paths/login | |
parent | 535b990215bdd861df5cf6215a5f72a47576f89b (diff) | |
download | wallet-core-851b2da39c3297ede3d267f3d2534cac213261c1.tar.xz |
fixing issues reported by Christian, wip
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/login')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/login/index.tsx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/login/index.tsx b/packages/merchant-backoffice-ui/src/paths/login/index.tsx index 9948307e4..a9e3c3a1b 100644 --- a/packages/merchant-backoffice-ui/src/paths/login/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/login/index.tsx @@ -52,7 +52,7 @@ function cleanUp(s: string): string { } export function LoginPage({ onConfirm }: Props): VNode { - const { url: backendURL, changeBackend } = useBackendContext(); + const { url: backendURL, changeBackend, resetBackend } = useBackendContext(); const { admin, id } = useInstanceContext(); const { requestNewLoginToken } = useCredentialsChecker(); const [token, setToken] = useState(""); @@ -73,10 +73,9 @@ export function LoginPage({ onConfirm }: Props): VNode { }, [backendURL, id, token]) async function changeServer() { - changeBackend("") + resetBackend() } - console.log(admin, id) if (admin && id !== "default") { //admin trying to access another instance return (<div class="columns is-centered" style={{ margin: "auto" }}> @@ -211,10 +210,7 @@ export function LoginPage({ onConfirm }: Props): VNode { borderTop: 0, }} > - <AsyncButton - - onClick={changeServer} - > + <AsyncButton onClick={changeServer}> <i18n.Translate>Change server</i18n.Translate> </AsyncButton> @@ -304,11 +300,8 @@ export function ConnectionPage({ onConfirm }: { onConfirm: (s: string) => void } borderTop: 0, }} > - <AsyncButton - disabled={backendURL === url} - onClick={doConnect} - > - <i18n.Translate>Try again</i18n.Translate> + <AsyncButton onClick={doConnect}> + <i18n.Translate>Connect</i18n.Translate> </AsyncButton> </footer> </div> |