done
This commit is contained in:
parent
ad712108c0
commit
17fc533c25
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -27,7 +27,7 @@
|
|||
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
|
||||
<!-- 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">
|
||||
<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">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -1,84 +1,77 @@
|
|||
import { useEffect } from "react";
|
||||
import Footer from "./Footer";
|
||||
import Navbar from "./Navbar";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { showUser } from "../redux/features/userSlice";
|
||||
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
|
||||
const Dashboard = () => {
|
||||
|
||||
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 />
|
||||
const { user } = useSelector((state) => ({ ...state.auth }));
|
||||
|
||||
|
||||
<main style={{ flex: 1 }}>
|
||||
return (
|
||||
|
||||
<section
|
||||
className="py-19 py-md-5 py-xl-8"
|
||||
style={{ backgroundColor: "#FFFFFF" }}
|
||||
>
|
||||
<div style={{ display: "flex", flexDirection: "column", minHeight: "100vh" }}>
|
||||
|
||||
<div className="container-fluid px-0">
|
||||
<Navbar />
|
||||
<br /> <br /> <br /> <br />
|
||||
|
||||
<div className="row gy-4 align-items-center justify-content-center ">
|
||||
<div className="col-12 col-md-6 col-xl-20 text-center text-md-start">
|
||||
<div className="text-bg-primary">
|
||||
<div className="px-4">
|
||||
<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%" }}
|
||||
<main style={{ flex: 1 }}>
|
||||
<section
|
||||
className="py-19 py-md-5 py-xl-8"
|
||||
style={{ backgroundColor: "#FFFFFF" }}
|
||||
>
|
||||
<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>
|
||||
);
|
||||
|
||||
|
||||
|
||||
<div className="container-fluid px-0">
|
||||
|
||||
<div className="row gy-4 align-items-center justify-content-center ">
|
||||
<div className="col-12 col-md-6 col-xl-20 text-center text-md-start">
|
||||
<div className="text-bg-primary">
|
||||
<div className="px-4">
|
||||
<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">
|
||||
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;
|
||||
|
|
|
@ -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
|
|
@ -1,100 +1,106 @@
|
|||
import { NavLink } from "react-router-dom";
|
||||
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 (
|
||||
<>
|
||||
<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="d-flex align-items-center">
|
||||
<img
|
||||
src={logo}
|
||||
alt="logo"
|
||||
width="75"
|
||||
height="75"
|
||||
className="img-fluid"
|
||||
/>
|
||||
<p
|
||||
style={{
|
||||
display: "inline-block",
|
||||
fontStyle: "italic",
|
||||
fontSize: "14px",
|
||||
color: "white",
|
||||
margin: "0 0 0 10px",
|
||||
}}
|
||||
>
|
||||
{/* Only Portal of Certified Realtor Lender and Borrowers */}
|
||||
</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
|
||||
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="d-flex align-items-center">
|
||||
<img
|
||||
src={logo}
|
||||
alt="logo"
|
||||
width="75"
|
||||
height="75"
|
||||
className="img-fluid"
|
||||
/>
|
||||
<p
|
||||
style={{
|
||||
display: "inline-block",
|
||||
fontStyle: "italic",
|
||||
fontSize: "14px",
|
||||
color: "white",
|
||||
margin: "0 0 0 10px",
|
||||
}}
|
||||
>
|
||||
{/* Only Portal of Certified Realtor Lender and Borrowers */}
|
||||
</p>
|
||||
</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>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue