From 568e0abfa1101d554870e55bbc773a344148cfea Mon Sep 17 00:00:00 2001 From: orangecoding Date: Tue, 31 Mar 2026 09:18:49 +0200 Subject: [PATCH] fixing login not showing if username or password is incorrect --- ui/src/views/login/Login.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/src/views/login/Login.jsx b/ui/src/views/login/Login.jsx index d051e9a..db41eaf 100644 --- a/ui/src/views/login/Login.jsx +++ b/ui/src/views/login/Login.jsx @@ -10,7 +10,7 @@ import Logo from '../../components/logo/Logo'; import { xhrPost } from '../../services/xhr'; import { useNavigate } from 'react-router-dom'; import { useActions, useSelector } from '../../services/state/store'; -import { Input, Button, Banner, Toast } from '@douyinfe/semi-ui-19'; +import { Input, Button, Banner } from '@douyinfe/semi-ui-19'; import './login.less'; import { IconUser, IconLock } from '@douyinfe/semi-icons'; @@ -45,12 +45,10 @@ export default function Login() { }); /* eslint-disable no-unused-vars */ } catch (ignored) { - Toast.error('Login unsuccessful…'); + setError('Login unsuccessful. Please check your username and password.'); return; } - Toast.success('Login successful!'); - await actions.user.getCurrentUser(); navigate('/dashboard'); };