From 5bcff97ff51cd51c220faad754848819bddcb633 Mon Sep 17 00:00:00 2001 From: NilsUeter Date: Tue, 18 Apr 2023 22:08:30 +0200 Subject: [PATCH] add github link --- src/App.jsx | 7 +++++++ src/Roster.jsx | 19 +++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index ad4dfe1..e1430d0 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -141,6 +141,13 @@ function App() { {" "} website. +
+ FancyScribe is an open-source project and can be found on Github ( + + FancyScribe + + ) . +
Output Examples
diff --git a/src/Roster.jsx b/src/Roster.jsx index 07f7377..da67fa2 100644 --- a/src/Roster.jsx +++ b/src/Roster.jsx @@ -326,9 +326,21 @@ const ModelStats = ({ modelStats, index, showName, modelList }) => { if (!wounds) { wounds = "/"; } - const modelListMatches = modelList - .filter((model) => model.includes(name)) - .map((model) => "(" + model.split("(")[1]); + if (!name.includes("Sgt")) { + modelList = modelList.filter((model) => !model.includes("Sgt")); + } + if (!name.includes("Sergeant")) { + modelList = modelList.filter((model) => !model.includes("Sergeant")); + } + let modelListMatches = modelList.filter((model) => + model.includes(name + " w") + ); + if (modelListMatches.length === 0) { + modelListMatches = modelList.filter((model) => model.includes(name)); + } + modelListMatches = modelListMatches.map((model) => + model.replaceAll(name, "") + ); return (
@@ -365,7 +377,6 @@ const ModelStats = ({ modelStats, index, showName, modelList }) => { }; const FactionIcon = ({ catalog }) => { - console.log(catalog); return (