Clean clean clean

This commit is contained in:
Focusvity 2022-06-30 20:09:23 +10:00
parent 3b35680b72
commit d69a7c1980
No known key found for this signature in database
GPG Key ID: 5624C6428B55CB99
4 changed files with 9 additions and 10 deletions

View File

@ -1,4 +1,3 @@
import React from 'react';
import { BrowserRouter, Route, Routes } from "react-router-dom";
import HomePage from "./pages/HomePage";
import { Button, Nav, Navbar, NavLink, NavDropdown, Container } from "react-bootstrap";

View File

@ -50,6 +50,10 @@ tr:nth-child(odd) {
background-color: #3c3c3c;
}
tr:nth-child(even) {
background-color: #2c2c2c;
}
td {
height: 70px;
color: white;

View File

@ -1,4 +1,3 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';

View File

@ -10,8 +10,7 @@ const DownloadPage = () => {
const [version, setVersion] = useState("1.19")
const versions = ["1.17.1", "1.18.2", "1.19"]
useEffect(() => {
doJobs().then(value => {
})
doJobs()
}, [])
function doJobs(): Promise<void> {
@ -25,9 +24,7 @@ const DownloadPage = () => {
getBuilds(job.name).then(value1 => {
setJobs(prevState => {
let newState = new Map(prevState)
newState.set(job, value1)
return newState
return new Map(prevState).set(job, value1)
})
resolve()
})
@ -47,10 +44,10 @@ const DownloadPage = () => {
{Array.from(jobs.keys()).sort(function (x, y) {
let x1 = x.name.split(".")
let y1 = y.name.split(".")
if (x1.length >= 3) {
if (x1.length === 3) {
x1 = x1.slice(0, x1.length - 1)
}
if (y1.length >= 3) {
if (y1.length === 3) {
y1 = y1.slice(0, y1.length - 1)
}
return y1.join(".") > x1.join(".") ? 1 : -1
@ -61,7 +58,7 @@ const DownloadPage = () => {
<br /><br />
<table className="downloads">
<tbody>
{jobs.get(Array.from(jobs.keys()).filter(value => value.name == version)[0])?.map(value => {
{jobs.get(Array.from(jobs.keys()).filter(value => value.name === version)[0])?.map(value => {
return <tr key={value.number}>
<td align="center"><Button className="download" href={value.artifact ? `${value.url}/artifact/${value.artifact}` : value.url}>#{value.number}</Button></td>
<td className="commits"><ul>{value.changes?.map(value1 => {