"use client"; import { useEffect, useState } from "react"; 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"; interface Mods { _id: string; date: string; fileName: string; version: string; fileSize: string; downloadLink: string; } const ModsPage: React.FC = () => { const [downloads, setDownloads] = useState([]); const [error, setError] = useState(""); const fetchDownloads = async () => { try { const response = await fetch("/api/mods", { method: "GET" }); if (response.ok) { const data: Mods[] = await response.json(); setDownloads(data); } else { throw new Error(`HTTP error! status: ${response.status}`); } } catch (error: any) { setError(error); } }; useEffect(() => { fetchDownloads(); const interval = setInterval(() => { fetchDownloads(); }, 10000); return () => clearInterval(interval); }, []); return (

SvrJS Mods

Get all the latest version of SVR.JS Mods and compiled Files here!{" "}

{error &&

{error}

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