diff --git a/src/components/Dashboard.tsx b/src/components/Dashboard.tsx
index 8c405c8..6e6d431 100644
--- a/src/components/Dashboard.tsx
+++ b/src/components/Dashboard.tsx
@@ -1,62 +1,54 @@
-import { Box, Card, CardContent, Grid, Paper, Typography, styled } from "@mui/material";
-import React, { useEffect } from "react";
-import { getLinkedProjectList, useLinkedProjectData } from "../APIs/ProjectScreenAPIs/getLinkedProject";
+import React from "react";
+import {
+ Box,
+ Grid,
+ Paper,
+ Typography,
+ styled,
+} from "@mui/material";
import { useUnlinkedProjectData } from "../APIs/ProjectScreenAPIs/getUnlinkedProject";
+import { useLinkedProjectData } from "../APIs/ProjectScreenAPIs/getLinkedProject";
-export default function Dashboard(){
+const DashboardItem = styled(Paper)(({ theme }) => ({
+ backgroundColor: "#1e1e1e",
+ color: "white",
+ padding: theme.spacing(5),
+ textAlign: "left",
+}));
- const [linkedProjectData, setLinkedProjectData] = React.useState()
- const { data: getLinkedProjectList } = useLinkedProjectData('');
- const { data: getUnlinkedProjectList } = useUnlinkedProjectData('');
+const Dashboard = () => {
+ const { data: unlinkedProjects } = useUnlinkedProjectData("");
+ const { data: linkedProjects } = useLinkedProjectData("");
- const Item = styled(Paper)(({ theme }) => ({
- backgroundColor: '#1e1e1e',
- color:"white",
- padding: theme.spacing(5),
- textAlign: 'left',
-
- }));
+ return (
+
+
+
+ {renderDashboardItem("New Projects That needs Contract Linkage", unlinkedProjects, "#C00243")}
+ {renderDashboardItem("Projects That needs To Be Published", linkedProjects, "#E1AB1A")}
+
+
+
+ );
+};
- return (
-
-
-
-
- -
-
-
-
- {getUnlinkedProjectList && getUnlinkedProjectList.length}
-
-
-
-
- New Projects That needs Contract Linkage
-
-
-
-
-
-
- -
-
-
-
- {getLinkedProjectList && getLinkedProjectList.length}
-
-
-
-
- Projects That needs To Be Published
-
-
-
-
-
-
-
-
-
-
- )
-}
\ No newline at end of file
+const renderDashboardItem = (label:any, projects:any, color:any) => (
+
+
+
+
+
+ {projects && projects.length}
+
+
+
+
+ {`${label}`}
+
+
+
+
+
+);
+
+export default Dashboard;