|
1 | | -import React from "react"; |
| 1 | +import React, { useState } from "react"; |
2 | 2 | import logo from "../assets/logo.png"; |
| 3 | +import "./Login.css"; |
3 | 4 |
|
4 | 5 | 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 | + |
5 | 19 | return ( |
6 | 20 | <div |
7 | 21 | 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", |
12 | 28 | }} |
13 | 29 | > |
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> |
20 | 35 |
|
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> |
23 | 90 | </div> |
24 | 91 | ); |
25 | 92 | } |
0 commit comments