diff options
author | Sebastian <sebasjm@gmail.com> | 2024-01-19 17:09:43 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-01-19 17:09:52 -0300 |
commit | d845c0cf225a0f05214f368f4a98257238f53d07 (patch) | |
tree | 756d754f3c1c85460f01b4b5068aa02e4c0760a6 /packages/demobank-ui/src/pages/LoginForm.tsx | |
parent | a04e822af063951d39f4ddc597cd163037cb5010 (diff) | |
download | wallet-core-d845c0cf225a0f05214f368f4a98257238f53d07.tar.xz |
fixes #8147
Diffstat (limited to 'packages/demobank-ui/src/pages/LoginForm.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/LoginForm.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/demobank-ui/src/pages/LoginForm.tsx b/packages/demobank-ui/src/pages/LoginForm.tsx index 627252682..7ec490c19 100644 --- a/packages/demobank-ui/src/pages/LoginForm.tsx +++ b/packages/demobank-ui/src/pages/LoginForm.tsx @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { TranslatedString } from "@gnu-taler/taler-util"; +import { HttpStatusCode, TranslatedString } from "@gnu-taler/taler-util"; import { LocalNotificationBanner, ShowInputErrorLabel, useLocalNotification, useTranslationContext } from "@gnu-taler/web-util/browser"; import { Fragment, VNode, h } from "preact"; import { useEffect, useRef, useState } from "preact/hooks"; @@ -76,13 +76,13 @@ export function LoginForm({ currentUser, fixedUser, onRegister }: { fixedUser?: backend.logIn({ username, token: resp.body.access_token }); } else { switch (resp.case) { - case "wrong-credentials": return notify({ + case HttpStatusCode.Unauthorized: return notify({ type: "error", title: i18n.str`Wrong credentials for "${username}"`, description: resp.detail.hint as TranslatedString, debug: resp.detail, }) - case "not-found": return notify({ + case HttpStatusCode.NotFound: return notify({ type: "error", title: i18n.str`Account not found`, description: resp.detail.hint as TranslatedString, |