Skip to content

Commit 128caff

Browse files
author
Uttam Singh
committed
Replace welcome screen with login form
1 parent c8dc50d commit 128caff

File tree

1 file changed

+80
-13
lines changed

1 file changed

+80
-13
lines changed

frontend/src/pages/Login.jsx

Lines changed: 80 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,92 @@
1-
import React from "react";
1+
import React, { useState } from "react";
22
import logo from "../assets/logo.png";
3+
import "./Login.css";
34

45
export default function Login() {
6+
const [email, setEmail] = useState("");
7+
const [password, setPassword] = useState("");
8+
9+
const handleSubmit = (e) => {
10+
e.preventDefault();
11+
// Replace this with your backend API call later
12+
if (email === "[email protected]" && password === "password123") {
13+
window.location.href = "/dashboard";
14+
} else {
15+
alert("Invalid credentials");
16+
}
17+
};
18+
519
return (
620
<div
721
style={{
8-
textAlign: "center",
9-
marginTop: "80px",
10-
fontFamily: "Arial, sans-serif",
11-
color: "#0047AB",
22+
display: "flex",
23+
flexDirection: "column",
24+
alignItems: "center",
25+
justifyContent: "center",
26+
height: "100vh",
27+
backgroundColor: "#f5f9ff",
1228
}}
1329
>
14-
{/* ✅ Logo */}
15-
<img
16-
src={logo}
17-
alt="Edme Insurance Logo"
18-
style={{ width: "120px", height: "auto", marginBottom: "20px" }}
19-
/>
30+
<img src={logo} alt="Company Logo" style={{ width: "120px", marginBottom: "20px" }} />
31+
<h1 style={{ color: "#004aad" }}>Welcome to FAT-EIBL</h1>
32+
<p style={{ color: "#003b80", marginBottom: "30px" }}>
33+
Finance Audit Tracker – Edme Insurance Brokers Limited
34+
</p>
2035

21-
<h1>Welcome to FAT-EIBL</h1>
22-
<p>Finance Audit Tracker – Edme Insurance Brokers Limited</p>
36+
<form
37+
onSubmit={handleSubmit}
38+
style={{
39+
background: "white",
40+
padding: "30px",
41+
borderRadius: "12px",
42+
boxShadow: "0px 2px 10px rgba(0,0,0,0.1)",
43+
width: "320px",
44+
textAlign: "center",
45+
}}
46+
>
47+
<input
48+
type="email"
49+
placeholder="Email"
50+
value={email}
51+
onChange={(e) => setEmail(e.target.value)}
52+
style={{
53+
width: "100%",
54+
padding: "10px",
55+
marginBottom: "15px",
56+
border: "1px solid #ccc",
57+
borderRadius: "8px",
58+
}}
59+
required
60+
/>
61+
<input
62+
type="password"
63+
placeholder="Password"
64+
value={password}
65+
onChange={(e) => setPassword(e.target.value)}
66+
style={{
67+
width: "100%",
68+
padding: "10px",
69+
marginBottom: "20px",
70+
border: "1px solid #ccc",
71+
borderRadius: "8px",
72+
}}
73+
required
74+
/>
75+
<button
76+
type="submit"
77+
style={{
78+
backgroundColor: "#004aad",
79+
color: "white",
80+
border: "none",
81+
padding: "10px 20px",
82+
borderRadius: "8px",
83+
cursor: "pointer",
84+
width: "100%",
85+
}}
86+
>
87+
Login
88+
</button>
89+
</form>
2390
</div>
2491
);
2592
}

0 commit comments

Comments
 (0)