diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index f53a071..13746b8 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -17,6 +17,7 @@ import CountUp from "react-countup"; import { Button } from "@/components/ui/button"; import { useRouter } from "next/navigation"; import Link from "next/link"; +import { Modal } from "@/components/modal"; export default function Dashboard() { const supabase = createSupabaseClient(); @@ -296,11 +297,20 @@ export default function Dashboard() { }; })} /> -
- {filteredProject && filteredProject.length > 6 ? ( - +
+ {filteredProject && filteredProject.length > 1 ? ( + { + return { + date: item.created_time, + name: item.username, + amount: item.deal_amount, + status: item.deal_status, + logoURL: Array.isArray(item.avatar_url) ? item.avatar_url[0] : item.avatar_url, + profileURL: `/profile/${item.investor_id}`, + }; + })} + /> ) : undefined}
diff --git a/src/app/portfolio/[uid]/page.tsx b/src/app/portfolio/[uid]/page.tsx index 5b1ed70..4a362d2 100644 --- a/src/app/portfolio/[uid]/page.tsx +++ b/src/app/portfolio/[uid]/page.tsx @@ -189,8 +189,8 @@ export default async function Portfolio({ params }: { params: { uid: string } })
-
- +
+ Categories of Invested Projects @@ -215,7 +215,7 @@ export default async function Portfolio({ params }: { params: { uid: string } }) /> - + Types of Businesses Invested In @@ -245,7 +245,18 @@ export default async function Portfolio({ params }: { params: { uid: string } }) Recent investment - + { + return { + name: item.name, + amount: item.amount, + avatar: item.logo_url, + date: new Date(item.date), + status: item.status, + profile_url: `/deals/${item.projectId}`, + }; + })} + />
{deals && deals.length > 5 ? ( diff --git a/src/components/dataTable.tsx b/src/components/dataTable.tsx index 17d2b7c..16e5e3b 100644 --- a/src/components/dataTable.tsx +++ b/src/components/dataTable.tsx @@ -70,13 +70,18 @@ export const columns: ColumnDef[] = [ }, cell: ({ row }) => (
- +
), }, diff --git a/src/lib/data/investmentQuery.ts b/src/lib/data/investmentQuery.ts index 7c11aa0..dfbabd2 100644 --- a/src/lib/data/investmentQuery.ts +++ b/src/lib/data/investmentQuery.ts @@ -20,6 +20,9 @@ export const getInvestmentByProjectsIds = (client: SupabaseClient, projectIds: s deal_status:value ), project_id, + ...project_id ( + project_name + ), deal_amount, created_time, ...profiles (