diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index 3c678c3..21f9dd1 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -93,13 +93,13 @@ export default function Dashboard() { const fetchProjects = async () => { if (userId) { const { data, error } = await getProjectByUserId(supabase, userId); - // alert(JSON.stringify(data)); if (error) { console.error("Error while fetching projects"); } if (data) { + // set project and current project id setProjects(data); - // console.table(data); + setCurrentProjectId(data[0].id); } } else { console.error("Error with UserId while fetching projects"); @@ -108,8 +108,6 @@ export default function Dashboard() { }; fetchProjects(); }, [supabase, userId]); - // console.table(projects); - // console.table(latestInvestment); return (
+
+20.1% from last month
+
+180.1% from last month
+
+19% from last month