import { Card, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Link } from "react-router-dom"; import { useDocsTheme } from "@/contexts/DocsThemeContext"; export interface FeaturedUpdate { title: string; description: string; date: string; type: string; isNew?: boolean; } const defaultUpdates: FeaturedUpdate[] = [ { title: "New AI Integration Tutorials", description: "Learn how to integrate cutting-edge AI features", date: "2 days ago", type: "Tutorial", isNew: true, }, { title: "API v2.1 Documentation", description: "Updated API docs with new endpoints and features", date: "1 week ago", type: "API", }, { title: "Performance Best Practices", description: "New guide on optimizing application performance", date: "2 weeks ago", type: "Guide", }, ]; interface RecentUpdatesSectionProps { updates?: FeaturedUpdate[]; showViewAll?: boolean; } export default function RecentUpdatesSection({ updates = defaultUpdates, showViewAll = true, }: RecentUpdatesSectionProps) { const { colors, theme } = useDocsTheme(); const viewAllButtonClass = theme === "professional" ? "border-gray-300 text-black hover:bg-gray-100" : "border-slate-600 text-white hover:bg-slate-800"; const hoverBorderColor = theme === "professional" ? "hover:border-gray-400" : "hover:border-purple-500/50"; return (

Recent Updates

{showViewAll && ( )}
{updates.map((update, index) => (

{update.title}

{update.isNew && ( New )} {update.type}

{update.description}

{update.date}

))}
); }