diff --git a/client/components/docs/RecentUpdatesSection.tsx b/client/components/docs/RecentUpdatesSection.tsx new file mode 100644 index 00000000..6c56caca --- /dev/null +++ b/client/components/docs/RecentUpdatesSection.tsx @@ -0,0 +1,97 @@ +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"; + +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) { + return ( +
+
+

Recent Updates

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

{update.title}

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

+ {update.description} +

+
+
+

{update.date}

+
+
+
+
+ ))} +
+
+ ); +}