improve order even more

This commit is contained in:
NilsUeter
2023-05-07 21:59:22 +02:00
parent a9f5c71501
commit f4f3e355bf
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -100,6 +100,7 @@ const Force = ({ force, onePerPage }) => {
{units.map((unit, index) => (
<Unit
key={index}
index={index}
unit={unit}
catalog={catalog}
onePerPage={onePerPage}
@@ -110,7 +111,7 @@ const Force = ({ force, onePerPage }) => {
);
};
const Unit = ({ unit, catalog, onePerPage }) => {
const Unit = ({ unit, index, catalog, onePerPage }) => {
let {
name,
weapons,
@@ -151,7 +152,9 @@ const Unit = ({ unit, catalog, onePerPage }) => {
return (
<div
className={"avoid-page-break " + (onePerPage ? "page-break" : "")}
className={
"avoid-page-break " + (onePerPage && index !== 0 ? "page-break" : "")
}
style={{
fontWeight: 500,
border: "2px solid var(--primary-color)",