import { useState } from "react"; import Footer from "./Footer"; import Navbar from "./Navbar"; import profilepic from "../img/samplepic.jpg"; import Addproperty from "./Addproperty"; import UserProperties from "./UserProperties"; import "../dashboard.css"; import { useSelector } from "react-redux"; import UserProfile from "./UserProfile"; import { NavLink } from "react-router-dom"; const Dashboard = () => { const [activeTab, setActiveTab] = useState("dashboard"); const { user } = useSelector((state) => state.auth); const renderTabContent = () => { switch (activeTab) { case "Userdetails": return ; case "addProperty": return ; case "activeProperties": return (

Active Properties

); case "closedProperties": return

These are your closed properties.

; default: return <>; } }; return ( <>





{/* Left sidebar */}
ProfileImage
{/* Other Information */}
{/* Main content area */}
{/* Static Dashboard greeting */}
Welcome to{" "} {user.result.title}. {user.result.firstName}{" "} {user.result.middleName} {user.result.lastName}
{/* Dynamic content based on the selected tab */} {renderTabContent()}