import type { GeneratedDocs } from "@codeboard/shared"; import { notFound } from "next/navigation"; import { Github, ArrowLeft } from "lucide-react"; import Link from "next/link"; async function fetchDocs(id: string): Promise { try { const baseUrl = process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000"; const response = await fetch(`${baseUrl}/api/docs/${id}`, { cache: "no-store", }); if (!response.ok) { return null; } return response.json(); } catch { return null; } } export default async function DocsPage({ params, }: { params: { id: string }; }) { const docs = await fetchDocs(params.id); if (!docs) { notFound(); } return (

Analyzing Repository

{docs.repoName || repoUrl || "Unknown repository"}

); }