From 7cc9181fb9c49b9663c90c2d72cb0678697bd158 Mon Sep 17 00:00:00 2001 From: "kartik.sharma" Date: Fri, 23 May 2025 11:18:58 +0530 Subject: [PATCH] Move all the project-related code from the Dashboard component into a new component named 'Projects'. --- src/components/Dashboard/Dashboard.jsx | 33 +++++--------------------- src/components/Dashboard/Projects.jsx | 33 ++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 27 deletions(-) create mode 100644 src/components/Dashboard/Projects.jsx diff --git a/src/components/Dashboard/Dashboard.jsx b/src/components/Dashboard/Dashboard.jsx index a352f5a5..e53175de 100644 --- a/src/components/Dashboard/Dashboard.jsx +++ b/src/components/Dashboard/Dashboard.jsx @@ -8,6 +8,7 @@ import { useDashboardTeamsCardData, useDashboardTasksCardData, } from "../../hooks/useDashboard_Data"; +import Projects from "./Projects"; const Dashboard = () => { const { projects, loading } = useProjects(); @@ -93,30 +94,9 @@ const Dashboard = () => { return (
- {/* Projects Card */} + {/* Projects Card */}
-
-
-
- {" "} - Projects -
-
-
-
-

- {projectsCardData.totalProjects?.toLocaleString()} -

- Total -
-
-

- {projectsCardData.ongoingProjects?.toLocaleString()} -

- Ongoing -
-
-
+
{/* Teams Card */} @@ -209,7 +189,7 @@ const Dashboard = () => { {selectedProjectId === "all" ? "All Projects" : projects?.find((p) => p.id === selectedProjectId) - ?.name || "Select Project"} + ?.name || "Select Project"}
    @@ -240,11 +220,10 @@ const Dashboard = () => { {["1D", "1W", "15D", "1M", "3M", "1Y", "5Y"].map((key) => (