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' }}>

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 ChangeTransactionPwd() {
const router = useRouter();
@@ -21,6 +21,12 @@ export default function ChangeTransactionPwd() {
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();
}, []);
@@ -121,7 +127,7 @@ export default function ChangeTransactionPwd() {
}
}, []);
if (authorized) {
if (authorized) {
return (
<Providers>
<div style={{ backgroundColor: "#f8f9fa", width: "100%", height: "auto", paddingTop: "5%" }}>
@@ -139,6 +145,16 @@ export default function ChangeTransactionPwd() {
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' }}>
<Box style={{ display: "flex", justifyContent: "center", alignItems: "center", columnGap: "5rem" }} bg="#c1e0f0">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -40,7 +40,7 @@ export default function Login() {
async function handleLogin(e: React.FormEvent) {
e.preventDefault();
setIsLogging(false);
setIsLogging(true);
const onlyDigit = /^\d{11}$/;
if (!onlyDigit.test(CIF)) {
@@ -144,7 +144,7 @@ export default function Login() {
Always login to our Net Banking site directly or through Banks website.
Do not disclose your UserId and Password to any third party and keep Your UserId and Password strictly confidential.
KCC Bank never asks for UserId,Passwords and Pins through email or phone.
Be ware of Phishing mails with links to fake bank's websites asking for personal information are in circulation.
Be ware of Phishing mails with links to fake bank&apos;s websites asking for personal information are in circulation.
Please DO NOT Click on the links given in the emails asking for personal details like bank account number, userID and password.
If you had shard your UserId and Password through such mails or links, please change your Password immediately.
Inform the Bank/branch in which your account is maintained for resetting your password.