import { getProjectByUserId } from "@/lib/data/projectQuery"; import { createSupabaseClient } from "@/lib/supabase/serverComponentClient"; import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { Button } from "@/components/ui/button"; import Link from "next/link"; export const ProjectProfileSection = async ({ userId }: { userId: string }) => { const supabase = createSupabaseClient(); const { data, error } = await getProjectByUserId(supabase, userId); if (error) { return ( Error Loading Data

Can't load business data

); } if (!data || data.length === 0) { return ( No Project Found

This business doesn't have any projects

); } return (
{data.map((project) => (
{project.project_name} {project.project_short_description}
))}
); };