Run checks on PR made (#1063)

* Run checks on PR made

* Prettify

* Refine criteria

* Bruh
This commit is contained in:
Kalle 2022-10-29 10:44:35 +03:00 committed by GitHub
parent 327df35380
commit 085ef8abe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,7 @@
name: Tests and checks on push
on:
pull_request:
push:
branches:
- rewrite

View File

@ -896,7 +896,10 @@ function ConsumptionTable({
subWeaponId: SubWeaponId;
}) {
const { t } = useTranslation(["analyzer", "weapons"]);
const maxSubsToUse = subWeaponId === TORPEDO_ID ? 1 : Math.max(...options.map((opt) => opt.subsUsed));
const maxSubsToUse =
subWeaponId === TORPEDO_ID
? 1
: Math.max(...options.map((opt) => opt.subsUsed));
const types = Array.from(new Set(options.map((opt) => opt.type)));
return (
@ -927,7 +930,7 @@ function ConsumptionTable({
</table>
<div className="analyzer__consumption-table-explanation">
{t("analyzer:consumptionExplanation", { maxSubsToUse })}
{subWeaponId === TORPEDO_ID && <>{" "}{t("analyzer:torpedoExplanation")}</>}
{subWeaponId === TORPEDO_ID && <> {t("analyzer:torpedoExplanation")}</>}
</div>
</>
);