From 611b3a9292ad445c3a1b78353813acca98eba582 Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Sat, 31 Dec 2022 07:46:00 +0000 Subject: [PATCH] Add Tricolour Battle result --- src/components/SplatfestResultsBox.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/SplatfestResultsBox.vue b/src/components/SplatfestResultsBox.vue index 9f724fa..eaf66c3 100644 --- a/src/components/SplatfestResultsBox.vue +++ b/src/components/SplatfestResultsBox.vue @@ -58,7 +58,7 @@ function results(ratioKey, topKey) { } const resultRows = computed(() => { - return [ + const rows = [ { title: 'Conch Shells', results: results('horagaiRatio', 'isHoragaiRatioTop'), @@ -76,6 +76,15 @@ const resultRows = computed(() => { results: results('challengeContributionRatio', 'isChallengeContributionRatioTop'), }, ]; + + if (props.festival.teams.find(t => t.result.tricolorContributionRatio !== null)) { + rows.push({ + title: 'Tricolor Battle', + results: results('tricolorContributionRatio', 'isTricolorContributionRatioTop'), + }); + } + + return rows; }); const winner = computed(() => props.festival.teams.find(t => t.result.isWinner));