remove conflicting docs pages, reverse order of downloads

This commit is contained in:
NerfedJabolo 2024-06-19 17:07:40 +03:00
parent 685b8cb52a
commit 7c2d8ceba3
3 changed files with 51 additions and 55 deletions

View file

@ -1,7 +1,9 @@
import React from "react";
import Sidebar from '@/components/shared/Sidebar';
const Docs = () => {
return <div>Docs</div>;
};
export default Docs;
export default function Page() {
return (
<>
<Sidebar />
</>
);
}

View file

@ -1,4 +1,4 @@
import { Button } from "@/components/ui/button";
import { Button } from '@/components/ui/button';
import {
Table,
TableBody,
@ -8,38 +8,38 @@ import {
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import { Download } from "lucide-react";
import Link from "next/link";
} from '@/components/ui/table';
import { Download } from 'lucide-react';
import Link from 'next/link';
const downloads = [
{
date: "2024-06-01",
fileName: "SVRJS_v1.0.0.zip",
version: "1.0.0",
fileSize: "15MB",
downloadLink: "/downloads/SVRJS_v1.0.0.zip",
date: '2024-06-01',
fileName: 'SVRJS_v1.0.0.zip',
version: '1.0.0',
fileSize: '15MB',
downloadLink: '/downloads/SVRJS_v1.0.0.zip',
},
{
date: "2024-06-10",
fileName: "SVRJS_v1.1.0.zip",
version: "1.1.0",
fileSize: "18MB",
downloadLink: "/downloads/SVRJS_v1.1.0.zip",
date: '2024-06-10',
fileName: 'SVRJS_v1.1.0.zip',
version: '1.1.0',
fileSize: '18MB',
downloadLink: '/downloads/SVRJS_v1.1.0.zip',
},
{
date: "2024-06-15",
fileName: "SVRJS_v1.2.0.zip",
version: "1.2.0",
fileSize: "20MB",
downloadLink: "/downloads/SVRJS_v1.2.0.zip",
date: '2024-06-15',
fileName: 'SVRJS_v1.2.0.zip',
version: '1.2.0',
fileSize: '20MB',
downloadLink: '/downloads/SVRJS_v1.2.0.zip',
},
{
date: "2024-06-20",
fileName: "SVRJS_v1.3.0.zip",
version: "1.3.0",
fileSize: "22MB",
downloadLink: "/downloads/SVRJS_v1.3.0.zip",
date: '2024-06-20',
fileName: 'SVRJS_v1.3.0.zip',
version: '1.3.0',
fileSize: '22MB',
downloadLink: '/downloads/SVRJS_v1.3.0.zip',
},
];
@ -67,22 +67,25 @@ const DownloadPage = () => {
</TableRow>
</TableHeader>
<TableBody>
{downloads.map((download) => (
<TableRow key={download.fileName}>
<TableCell className="font-medium">{download.date}</TableCell>
<TableCell>{download.fileName}</TableCell>
<TableCell>{download.version}</TableCell>
<TableCell className="text-left">{download.fileSize}</TableCell>
<TableCell className="flex items-center justify-end">
<Link href={download.downloadLink}>
<Button variant={"ghost"} className="">
<Download className="w-4 h-4 mr-2" />
Download
</Button>
</Link>
</TableCell>
</TableRow>
))}
{downloads
.slice()
.reverse()
.map((download) => (
<TableRow key={download.fileName}>
<TableCell className="font-medium">{download.date}</TableCell>
<TableCell>{download.fileName}</TableCell>
<TableCell>{download.version}</TableCell>
<TableCell className="text-left">{download.fileSize}</TableCell>
<TableCell className="flex items-center justify-end">
<Link href={download.downloadLink}>
<Button variant={'ghost'} className="">
<Download className="w-4 h-4 mr-2" />
Download
</Button>
</Link>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</section>

View file

@ -1,9 +0,0 @@
import Sidebar from '@/components/shared/Sidebar';
export default function Page() {
return (
<>
<Sidebar />
</>
);
}