commit 07c739cbcd5990fa9058ee47a2df4a26f1d4b93b
parent 307fa433dde6e63d6b4af370bdf3d1cc50d05cce
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Thu, 10 Oct 2024 21:45:38 +0200
chore: undo weird formatting
Diffstat:
2 files changed, 16 insertions(+), 41 deletions(-)
diff --git a/index.html b/index.html
@@ -13,7 +13,7 @@
<title>My Heats</title>
</head>
<body>
- <noscript>Why You scared of JavaScript so much, failure.</noscript>
+ <noscript>Why you scared of JavaScript soo much, faailure.</noscript>
<div id="root"></div>
<script type="module" src="/src/frontend/main.jsx"></script>
</body>
diff --git a/src/frontend/Leaderboard.jsx b/src/frontend/Leaderboard.jsx
@@ -204,19 +204,14 @@ function NewHeatForm(leaderboard, rankingComp, selectHeatRef, selectRankRef, ses
<p>
Create new heat with top N athletes from the sorted leaderboard (<i>* required</i>).
</p>
- <form
- method="post"
- onSubmit={(e) =>
- newHeatFromLeaderboard(
- e,
- leaderboard,
- rankingComp,
- selectHeatRef,
- selectRankRef,
- session
- )
- }
- >
+ <form method="post" onSubmit={(e) => newHeatFromLeaderboard(
+ e,
+ leaderboard,
+ rankingComp,
+ selectHeatRef,
+ selectRankRef,
+ session
+ )}>
<div className="table-container">
<table>
<thead>
@@ -362,10 +357,7 @@ function Leaderboard({session}) {
<button disabled={!loading} className="loading">
↺ loading
</button>
- <button
- className={`show-details ${details ? "toggled" : ""}`}
- onClick={() => showDetails(!details)}
- >
+ <button className={`show-details ${details ? "toggled" : ""}`} onClick={() => showDetails(!details)}>
<div className="thumb"></div>
<span>{details ? "less" : "more"}</span>
</button>
@@ -422,36 +414,22 @@ function Leaderboard({session}) {
{i.firstname} {i.lastname}
</td>
<td data-title="Birthday" className={details ? "" : "hidden"}>
- {i.birthday
- ? new Date(i.birthday).toLocaleDateString(
- locale,
- dateOptions
- )
- : ""}
+ {i.birthday ? new Date(i.birthday).toLocaleDateString(
+ locale, dateOptions) : ""}
</td>
<td data-title="School" className={details ? "" : "hidden"}>
{i.school}
</td>
{heatSelection.map((h) => (
// list all scores from the judges seperated with '+' signs, show sum on right side
- <td
- key={h.value}
- className={details ? "right" : "hidden"}
- data-title={h.label}
- >
+ <td key={h.value} className={details ? "right" : "hidden"} data-title={h.label}>
{formatScores(i, h)}
</td>
))}
- <td
- className={details ? "right" : "hidden"}
- data-title="Best"
- >
+ <td className={details ? "right" : "hidden"} data-title="Best">
{i.bestHeat}
</td>
- <td
- className={details ? "right" : "hidden"}
- data-title="Worst"
- >
+ <td className={details ? "right" : "hidden"} data-title="Worst">
{i.worstHeat}
</td>
<td className="right total" data-title="Total">
@@ -475,10 +453,7 @@ function Leaderboard({session}) {
selectHeatRef={selectHeatRef}
selectRankRef={selectRankRef}
session={session}
- />
- ) : (
- ""
- )}
+ />) : ("")}
</>
)
}