Fix : Error of API integration

This commit is contained in:
2025-07-10 12:45:40 +05:30
parent 9a02cff754
commit e3391315dd
4 changed files with 36 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ import NextImage from "next/image";
import logo from '@/app/image/logo.jpg';
import changePwdImage from '@/app/image/changepw.png';
import CaptchaImage from './CaptchaImage';
import { IconEye, IconEyeOff } from '@tabler/icons-react';
import { IconEye, IconEyeOff, IconLogout } from '@tabler/icons-react';
export default function ChangeLoginPwd() {
const router = useRouter();
@@ -18,11 +18,15 @@ export default function ChangeLoginPwd() {
const [confirmPassword, setConfirmPassword] = useState("");
const [captchaInput, setCaptchaInput] = useState('');
const [captchaError, setCaptchaError] = useState('');
const [confirmVisible, setConfirmVisible] = useState(false);
const toggleConfirmVisibility = () => setConfirmVisible((v) => !v);
async function handleLogout(e: React.FormEvent) {
e.preventDefault();
localStorage.removeItem("access_token");
router.push("/login")
}
useEffect(() => {
generateCaptcha();
}, []);
@@ -141,6 +145,15 @@ export default function ChangeLoginPwd() {
alt="ebanking"
style={{ width: "100%", height: "100%" }}
/>
<Button style={{
position: 'absolute',
top: '50%',
left: '90%',
color: 'white',
textShadow: '1px 1px 2px black',
fontSize: "20px"
}}
leftSection={<IconLogout color='white' />} variant="subtle" onClick={handleLogout}>Logout</Button>
</Box>
<div style={{ marginTop: '10px' }}>