import Image from "next/image"; import { Button } from "@/components/ui/button"; import Link from "next/link"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { ProjectCard } from "@/components/projectCard"; import { getTopProjects } from "@/lib/data/projectQuery"; import { createSupabaseClient } from "@/lib/supabase/serverComponentClient"; import { Suspense } from "react"; import { FC } from "react"; interface Project { id: number; project_name: string; project_short_description: string; card_image_url: string; published_time: string; business: { location: string }[]; project_tag: { tag: { id: number; value: string }[] }[]; project_investment_detail: { min_investment: number; total_investment: number; }[]; } interface TopProjectsProps { projects: Project[]; } const TopProjects: FC = ({ projects }) => { if (!projects || projects.length === 0) { return
No top projects available.
; } return (
{projects.map((project) => ( Array.isArray(item.tag) ? item.tag.map((tag) => tag.value) : [] )} minInvestment={project.project_investment_detail[0]?.min_investment || 0} totalInvestor={0} totalRaised={project.project_investment_detail[0]?.total_investment || 0} /> ))}
); }; const ProjectsLoader = () => (
{[...Array(4)].map((_, index) => (
))}
); export default async function Home() { const supabase = createSupabaseClient(); const { data: topProjectsData, error: topProjectsError } = await getTopProjects(supabase); return (
{/* Expanded div */}

Explore the world of ventures

Unlock opportunities and connect with a community of passionate

investors and innovators.

Together, we turn ideas into impact.

Money
100M+ Global investor community 2,500+ Ventures supported $2.6B+ Capital raised Follow Us

Hottest Deals

The deals attracting the most interest right now

{topProjectsError ? (
Error fetching projects: {topProjectsError}
) : ( }> )}
); }