mirror of
https://github.com/AtlasMediaGroup/Scissors-Website.git
synced 2024-11-05 09:06:07 +00:00
Clean clean clean
This commit is contained in:
parent
3b35680b72
commit
d69a7c1980
@ -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";
|
||||
|
@ -50,6 +50,10 @@ tr:nth-child(odd) {
|
||||
background-color: #3c3c3c;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background-color: #2c2c2c;
|
||||
}
|
||||
|
||||
td {
|
||||
height: 70px;
|
||||
color: white;
|
||||
|
@ -1,4 +1,3 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
|
||||
|
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user