From c978977eda4af05a29214438276ca593b50257d7 Mon Sep 17 00:00:00 2001 From: NilsUeter Date: Sun, 22 Oct 2023 18:17:05 +0200 Subject: [PATCH] style improvements --- src/10th/Roster.jsx | 39 +++++++++++++++------------------------ src/App.jsx | 2 +- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/src/10th/Roster.jsx b/src/10th/Roster.jsx index f59e0bc..3279410 100644 --- a/src/10th/Roster.jsx +++ b/src/10th/Roster.jsx @@ -140,6 +140,13 @@ const Unit = ({ unit, index, catalog, onePerPage, forceRules }) => { if (areAllModelsTheSame(modelStats)) { modelStats = [modelStats[0]]; } + if (modelList.length === 1) { + modelList[0] = modelList[0] + .replace(name, "") + .replace("(", "") + .replace(")", ""); + } + return (
{ Don't print this card.
@@ -248,9 +255,9 @@ const Unit = ({ unit, index, catalog, onePerPage, forceRules }) => { {cost.points}pts
+
{ wounds = "/"; } - if (modelList.length === 1) { - modelList[0] = modelList[0] - .replace(name, "") - .replace("(", "") - .replace(")", ""); - } - const showWeapons = index === 0; return ( -
+
-
- {showName && ( -
- {name} -
- )} +
+ {showName &&
{name}
} {showWeapons && (
{modelList.map((model, index) => ( diff --git a/src/App.jsx b/src/App.jsx index eae1256..d7033d8 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -248,7 +248,7 @@ function App() { stringifyJSON(rostersJSON.filter((_, i) => i !== index)), ) } - className="print-display-none absolute right-[-4px] top-[-4px] rounded-full border-0 bg-red-600 fill-white p-[2px] text-sm transition duration-150 ease-in-out hover:bg-red-600 hover:bg-red-800 focus:outline-none" + className="print-display-none absolute right-[-4px] top-[-4px] rounded-full border-0 bg-red-600 fill-white p-[2px] text-sm transition duration-150 ease-in-out hover:bg-red-800 focus:outline-none" >