From 2bb137b3141a19f2b2eb329fef8a0076c65230dd Mon Sep 17 00:00:00 2001
From: Xinos
+ {{ getCorpStat(match.Corporation1Id) }} {{ match.Corporation1Score }} - {{ match.Corporation2Score }} + {{ getCorpStat(match.Corporation2Id) }}
@@ -133,6 +135,16 @@ async function fetchData() { response.value = await fetch(matchesUrl) .then((r) => r.json()); } +function getCorpStat(id: string) { + const corp = corps.value.find((e) => e.Id == id); + + if (corp) { + const [w, l, d, e] = Object.entries(corp) + .filter(([k]) => !['Name', 'Id'].includes(k)) + .map(([, v]) => v); + return `[W:${w}/L:${l}/D:${d}/E:${e}]`; + } +}