import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Github, ExternalLink, Star } from "lucide-react"; interface Project { _id: string; title: string; description: string; technologies: string[]; githubUrl?: string; liveUrl?: string; featured: boolean; } interface ProjectsSectionProps { projects: Project[]; } export function ProjectsSection({ projects }: ProjectsSectionProps) { const featuredProjects = projects.filter((p) => p.featured); const otherProjects = projects.filter((p) => !p.featured); return (

Projects

{featuredProjects.length > 0 && (

Featured Projects

{featuredProjects.map((project) => ( {project.title} Featured {project.description}
{project.technologies.map((tech) => ( {tech} ))}
{project.githubUrl && ( )} {project.liveUrl && ( )}
))}
)} {otherProjects.length > 0 && (

Other Projects

{otherProjects.map((project) => ( {project.title} {project.description}
{project.technologies.slice(0, 3).map((tech) => ( {tech} ))} {project.technologies.length > 3 && ( +{project.technologies.length - 3} )}
{project.githubUrl && ( )} {project.liveUrl && ( )}
))}
)}
); }