mirror of
https://github.com/Athou/commafeed.git
synced 2026-10-10 06:15:12 +00:00
Translate login authentication errors
This commit is contained in:
@@ -5,7 +5,7 @@ import { Anchor, Box, Button, Center, Container, Group, Paper, PasswordInput, St
|
||||
import { useForm } from "@mantine/form"
|
||||
import { useAsyncCallback } from "react-async-hook"
|
||||
import { Link } from "react-router-dom"
|
||||
import { client, errorToStrings } from "@/app/client"
|
||||
import { client, loginErrorToStrings } from "@/app/client"
|
||||
import { redirectToRootCategory } from "@/app/redirect/thunks"
|
||||
import { useAppDispatch, useAppSelector } from "@/app/store"
|
||||
import type { LoginRequest } from "@/app/types"
|
||||
@@ -39,7 +39,7 @@ export function LoginPage() {
|
||||
</Title>
|
||||
{login.error && (
|
||||
<Box mb="md">
|
||||
<Alert messages={errorToStrings(login.error)} />
|
||||
<Alert messages={loginErrorToStrings(login.error, _(msg`Wrong username or password`))} />
|
||||
</Box>
|
||||
)}
|
||||
<form onSubmit={form.onSubmit(login.execute)}>
|
||||
|
||||
Reference in New Issue
Block a user