"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 LOGS { _id: string; date: string; fileName: string; version: string; fileSize: string; downloadLink: string; } const DownloadPage: React.FC = () => { const [downloads, setDownloads] = useState([]); const [error, setError] = useState(""); const fetchDownloads = async () => { try { const response = await fetch("/api/logs", { method: "GET", }); if (response.ok) { const data: LOGS[] = 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 (

Server LOGS

Get all the latest version of SVRJS download and compiled Files here!

{error &&

{error}

} {downloads .slice(0, 10) .reverse() .map((download) => (
{download.date} {download.fileName} {download.version} {download.fileSize}
))}
); }; export default DownloadPage;