import { Button } from "@/components/ui/button"; import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { Download } from "lucide-react"; import Link from "next/link"; import clientPromise from "@/lib/db"; interface Download { _id: string; date: string; fileName: string; version: string; fileSize: string; downloadLink?: string; // Optional } export const dynamic = "force-static"; const DownloadPage: React.FC = async () => { let error: Error | null = null; let downloads: Download[] = []; try { const client = await clientPromise; const db = client.db(process.env.MONGODB_DB); downloads = (await db .collection("downloads") .find() .toArray()) as unknown as Download[]; } catch (err) { error = err as Error; } return (

Downloads

Get all the latest version of SVR.JS here! Other SVR.JS downloads can be found in{" "} SVR.JS downloads server .

{error &&

{error.message}

} A list of all available downloads. Date File Name Version File Size Download Link {downloads .slice(0, 10) .reverse() .map((download) => ( {download.date} {download.fileName} {download.version} {download.fileSize} {download.downloadLink ? ( ) : ( )} ))}
); }; export default DownloadPage;