diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx index 5a42e81..a715258 100644 --- a/src/app/home/page.tsx +++ b/src/app/home/page.tsx @@ -1,14 +1,31 @@ "use client"; -import { Button } from "@mantine/core"; +import React from 'react'; +import { AppShell, Button, Input, Group, Stack, Tooltip, UnstyledButton, Text, Avatar, Title, Divider, Box, Select, Paper, Image, Switch, Flex } from '@mantine/core'; +import { IconBook, IconBuildingBank, IconCoinRupee, IconCurrencyRupee, IconHome, IconLogout, IconSettings, IconUserCircle } from '@tabler/icons-react'; import { useRouter } from "next/navigation"; import { useEffect, useState } from "react"; - - +import { Providers } from "../providers"; +import myImage from '@/app/image/ebanking.jpg'; +import NextImage from 'next/image'; export default function Home() { - const[authorized,SetAuthorized] =useState(null); + const [authorized, SetAuthorized] = useState(null); const router = useRouter(); + const accountData = [ + { "stAccountNo": "50078975412", "stAccountType": "SA", "stAvailableBalance": "10000.0" }, + { "stAccountNo": "50078975413", "stAccountType": "SA", "stAvailableBalance": "12000.0" }, + { "stAccountNo": "50078975414", "stAccountType": "SA", "stAvailableBalance": "14000.0" }, + { "stAccountNo": "60078975412", "stAccountType": "LN", "stAvailableBalance": "100000.0" }, + { "stAccountNo": "60078975413", "stAccountType": "LN", "stAvailableBalance": "120000.0" } + ] + const savingsAccounts = accountData.filter(acc => acc.stAccountType === "SA"); + const [selectedSA, setSelectedSA] = useState(savingsAccounts[0]?.stAccountNo || ""); + const selectedSAData = savingsAccounts.find(acc => acc.stAccountNo === selectedSA); + const loanAccounts = accountData.filter(acc => acc.stAccountType === "LN"); + const [selectedLN, setSelectedLN] = useState(loanAccounts[0]?.stAccountNo || ""); + const selectedLNData = loanAccounts.find(acc => acc.stAccountNo === selectedLN); + const [showBalance, setShowBalance] = useState(false); async function handleLogout(e: React.FormEvent) { e.preventDefault(); @@ -21,18 +38,153 @@ export default function Home() { SetAuthorized(false); router.push("/login"); } - else{ + else { SetAuthorized(true); } }, []); - - if(authorized){ + + if (authorized) { return ( - <> -

Welcome to IB portal

- - - ); + +
+ ebanking +
+ + + + + {/* */} + + + +
+
+ Welcome, Rajat Kumar Maharana + Last logged in at 29/06/25, 05:35 PM +
+ + Show Balance + setShowBalance(event.currentTarget.checked)} /> + +
+ + + {/* */} + + Savings Account + ({ + value: acc.stAccountNo, + label: acc.stAccountNo + }))} + value={selectedLN} + // @ts-ignore + onChange={setSelectedLN} + size="xs" + styles={{ + input: { + backgroundColor: "white", + color: "black", + width: 150 + } + }} + /> + + {Number(selectedLNData?.stAccountNo || 0)} + + {showBalance ? `₹${Number(selectedLNData?.stAvailableBalance || 0).toLocaleString('en-IN')}` : "****"} + + + + +
+ +
+ + Send Money + + + + + + +
+ + © 2025 Kangra Central Co- Operative Bank + +
+
+ ); } - -} +} \ No newline at end of file diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index 8c6dabf..aa746f7 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -42,14 +42,11 @@ export default function Login() {