From 50fd17d41beee18b235f8e0aeb61bad6d0020869 Mon Sep 17 00:00:00 2001 From: NilsUeter Date: Sun, 7 Jun 2026 11:27:57 +0200 Subject: [PATCH] Move Unit Composition into the main table --- src/10th/Roster.jsx | 85 ++++++++++++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 24 deletions(-) diff --git a/src/10th/Roster.jsx b/src/10th/Roster.jsx index 11777a1..0336433 100644 --- a/src/10th/Roster.jsx +++ b/src/10th/Roster.jsx @@ -83,11 +83,11 @@ const Force = ({ force, onePerPage, colorUserChoice }) => { > {unitOrder.map((unit, index) => (
-
+
- {!hideModelCount && modelStats?.[0] && ( -
1 ? "" : "self-center" - }`} - style={{ - fontSize: "0.7em", - zIndex: 101, - }} - > - {modelList.map((model, index) => ( -
{model}
- ))} -
- )}
{ forceRules={forceRules} /> +
{ ); }; +const UnitComposition = ({ hideModelCount, modelStats, modelList }) => { + return ( + <> + {!hideModelCount && modelStats?.[0] && ( + <> + + + + + + + + + + + + + + + {modelList.map((model, index) => ( + + + + + ))} + + + )} + + ); +}; + const backgrounds = { "Imperium - Adeptus Astartes - Dark Angels": imperiumBackground, "Imperium - Adeptus Astartes - Space Wolves": imperiumBackground, @@ -1034,11 +1063,13 @@ const removeKeywordsSet = new Set([ "Melee Weapon", "Ranged Weapon", "Attacks Dx Weapon", - "Extra Attacks Weapon" + "Extra Attacks Weapon", ]); const Keywords = ({ keywords }) => { - const joinedKeywords = [...keywords].filter(key => !removeKeywordsSet.has(key)).join("; ") + const joinedKeywords = [...keywords] + .filter((key) => !removeKeywordsSet.has(key)) + .join("; "); return (
{ gap: 3, }} > - KEYWORDS: - + KEYWORDS: + + 70 ? ".8em" : "1em", fontWeight: 800, @@ -1092,7 +1126,10 @@ const Factions = ({ factions }) => { minHeight: 54, }} > - + FACTION KEYWORDS:
Unit Composition
{model}