This commit is contained in:
omkieit 2024-09-06 22:10:57 +05:30
parent ad712108c0
commit 17fc533c25
6 changed files with 241 additions and 298 deletions

80
ef-ui/dist/assets/index-DW_yaEwf.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,7 @@
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"> <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<!-- fonts --> <!-- fonts -->
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;800&family=Sen:wght@400;700;800&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;800&family=Sen:wght@400;700;800&display=swap" rel="stylesheet">
<script type="module" crossorigin src="/assets/index-S1fS9cGv.js"></script> <script type="module" crossorigin src="/assets/index-DW_yaEwf.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CyAHZLBw.css"> <link rel="stylesheet" crossorigin href="/assets/index-CyAHZLBw.css">
</head> </head>

View File

@ -1,84 +1,77 @@
import { useEffect } from "react";
import Footer from "./Footer"; import Footer from "./Footer";
import Navbar from "./Navbar"; import Navbar from "./Navbar";
import { useDispatch, useSelector } from "react-redux"; import { useSelector } from "react-redux";
import { showUser } from "../redux/features/userSlice";
const Dashboard = () => { const Dashboard = () => {
const { user } = useSelector((state) => ({ ...state.auth })); const { user } = useSelector((state) => ({ ...state.auth }));
const dispatch = useDispatch();
const userId = user?.result?._id;
useEffect(() => {
if (userId) {
dispatch(showUser(userId));
}
}, [userId, dispatch]);
return (
<div style={{ display: "flex", flexDirection: "column", minHeight: "100vh" }}>
<Navbar />
<br /> <br /> <br /> <br />
<main style={{ flex: 1 }}> return (
<section <div style={{ display: "flex", flexDirection: "column", minHeight: "100vh" }}>
className="py-19 py-md-5 py-xl-8"
style={{ backgroundColor: "#FFFFFF" }}
>
<div className="container-fluid px-0"> <Navbar />
<br /> <br /> <br /> <br />
<div className="row gy-4 align-items-center justify-content-center "> <main style={{ flex: 1 }}>
<div className="col-12 col-md-6 col-xl-20 text-center text-md-start"> <section
<div className="text-bg-primary"> className="py-19 py-md-5 py-xl-8"
<div className="px-4"> style={{ backgroundColor: "#FFFFFF" }}
<hr className="border-primary-subtle mb-4" />
<p className="lead mb-5">
A beautiful, easy-to-use, and secure Investor Portal that
gives your investors everything they may need
</p>
</div>
</div>
</div>
<div className="col-12 col-md-6 col-xl-5">
<div
className="card border-0 rounded-4 shadow-lg"
style={{ width: "100%" }}
> >
<div className="card-body p-3 p-md-4 p-xl-5">
{user?.result?._id && (
<div className="form-group row">
<label htmlFor="firstName" className="col-sm-6 col-form-label"> <div className="container-fluid px-0">
First Name:{" "}
<span style={{ color: "#067ADC" }}>{user.result.firstName}</span> <div className="row gy-4 align-items-center justify-content-center ">
</label> <div className="col-12 col-md-6 col-xl-20 text-center text-md-start">
<label htmlFor="lastName" className="col-sm-6 col-form-label"> <div className="text-bg-primary">
Last Name:{" "} <div className="px-4">
<span style={{ color: "#067ADC" }}>{user.result.lastName}</span> <hr className="border-primary-subtle mb-4" />
</label> <p className="lead mb-5">
<label htmlFor="email" className="col-sm-6 col-form-label"> A beautiful, easy-to-use, and secure Investor Portal that
Email:{" "} gives your investors everything they may need
<span style={{ color: "#067ADC" }}>{user.result.email}</span> </p>
</label> </div>
</div> </div>
)} </div>
</div>
</div>
</div>
</div> <div className="col-12 col-md-6 col-xl-5">
</div> <div
</section> className="card border-0 rounded-4 shadow-lg"
</main> style={{ width: "100%" }}
<Footer /> >
</div> <div className="card-body p-3 p-md-4 p-xl-5">
); {user?.result?._id && (
<div className="form-group row">
<label htmlFor="firstName" className="col-sm-6 col-form-label">
First Name:{" "}
<span style={{ color: "#067ADC" }}>{user.result.firstName}</span>
</label>
<label htmlFor="lastName" className="col-sm-6 col-form-label">
Last Name:{" "}
<span style={{ color: "#067ADC" }}>{user.result.lastName}</span>
</label>
<label htmlFor="email" className="col-sm-6 col-form-label">
Email:{" "}
<span style={{ color: "#067ADC" }}>{user.result.email}</span>
</label>
</div>
)}
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<Footer />
</div>
);
}; };
export default Dashboard; export default Dashboard;

View File

@ -1,56 +0,0 @@
import { NavLink } from "react-router-dom";
const Header = () => {
return (
<>
<div className="container-fluid p-0 m-0">
<nav
className="navbar navbar-expand-lg w-100"
style={{
backgroundColor: "#000000",
position: "fixed", // Make the navbar fixed at the top
top: 0,
left: 0,
right: 0,
zIndex: 1000, // Ensure the navbar is above other elements
}}
>
<div className="container-fluid d-flex align-items-center justify-content-between">
<div className="collapse navbar-collapse" id="navbarSupportedContent">
<form className="form-inline my-2 my-lg-0">
<div className="login_text">
<ul>
<li>
<NavLink to="/login" className="nav-link">
Login
</NavLink>
</li>
<li>
<a href="#">
<i className="fa fa-user" aria-hidden="true" />
</a>
</li>
</ul>
</div>
<div className="quote_btn">
<NavLink to="/register" className="nav-link">
Register
</NavLink>
</div>
</form>
</div>
</div>
</nav>
</div>
</>
)
}
export default Header

View File

@ -1,100 +1,106 @@
import { NavLink } from "react-router-dom";
import logo from "../logo.png"; import logo from "../logo.png";
const Navbar = () => { import { useSelector, useDispatch } from "react-redux";
import { NavLink } from "react-router-dom";
import { setLogout } from "../redux/features/authSlice";
import { useNavigate } from "react-router-dom";
const Navbar = () => {
const { user } = useSelector((state) => ({ ...state.auth }));
const dispatch = useDispatch();
const navigate = useNavigate();
const handleLogout = () => {
dispatch(setLogout());
navigate("/");
};
return ( return (
<> <>
<div className="container-fluid p-0 m-0"> <div
<nav className="navbar navbar-expand-lg w-100"
className="navbar navbar-expand-lg w-100" style={{
style={{ backgroundColor: "#000000",
backgroundColor: "#000000", position: "fixed", // Make the navbar fixed at the top
position: "fixed", // Make the navbar fixed at the top top: 0,
top: 0, left: 0,
left: 0, right: 0,
right: 0, zIndex: 1000, // Ensure the navbar is above other elements
zIndex: 1000, // Ensure the navbar is above other elements }}
}} >
> <div className="container-fluid d-flex align-items-center justify-content-between">
<div className="container-fluid d-flex align-items-center justify-content-between"> <div className="d-flex align-items-center">
<div className="d-flex align-items-center"> <img
<img src={logo}
src={logo} alt="logo"
alt="logo" width="75"
width="75" height="75"
height="75" className="img-fluid"
className="img-fluid" />
/> <p
<p style={{
style={{ display: "inline-block",
display: "inline-block", fontStyle: "italic",
fontStyle: "italic", fontSize: "14px",
fontSize: "14px", color: "white",
color: "white", margin: "0 0 0 10px",
margin: "0 0 0 10px", }}
}} >
> {/* Only Portal of Certified Realtor Lender and Borrowers */}
{/* Only Portal of Certified Realtor Lender and Borrowers */} </p>
</p>
</div>
<div className="collapse navbar-collapse" id="navbarSupportedContent">
<ul className="navbar-nav ml-auto">
<li className="nav-item active">
<NavLink to="/" className="nav-link">
Home
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/services" className="nav-link">
Services
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/about" className="nav-link">
About
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/projects" className="nav-link">
Project
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/contact" className="nav-link">
Contact Us
</NavLink>
</li>
</ul>
<form className="form-inline my-2 my-lg-0">
<div className="login_text">
<ul>
<li>
<NavLink to="/login" className="nav-link">
Login
</NavLink>
</li>
<li>
<a href="#">
<i className="fa fa-user" aria-hidden="true" />
</a>
</li>
</ul>
</div>
<div className="quote_btn">
<NavLink to="/register" className="nav-link">
Register
</NavLink>
</div>
</form>
</div>
</div> </div>
</nav>
<div className="collapse navbar-collapse" id="navbarSupportedContent">
<ul className="navbar-nav ml-auto">
<li className="nav-item active">
<NavLink to="/" className="nav-link">
Home
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/services" className="nav-link">
Services
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/about" className="nav-link">
About
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/projects" className="nav-link">
Project
</NavLink>
</li>
<li className="nav-item">
<NavLink to="/contact" className="nav-link">
Contact Us
</NavLink>
</li>
</ul>
{user?.result?._id ? (
<NavLink to="/dashboard">Dashboard</NavLink>
) : (
<NavLink to="/register" className="nav-link">
Register
</NavLink>
)}
{user?.result?._id ? (
<NavLink to="/login">
<p className="header-text" onClick={handleLogout}>
Logout
</p>
</NavLink>
) : (
<NavLink to="/login" className="nav-link">
Login
</NavLink>
)}
</div>
</div>
</div> </div>
</> </>
); );