From c7021c5689be22f82a285e7559203eafcc56b0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:27:33 -0500 Subject: [PATCH] feat: finalized --- src/commands/rating.tsx | 281 ++++++++++++++++++++-------------------- 1 file changed, 137 insertions(+), 144 deletions(-) diff --git a/src/commands/rating.tsx b/src/commands/rating.tsx index 6d765ada9..44db80553 100644 --- a/src/commands/rating.tsx +++ b/src/commands/rating.tsx @@ -2,7 +2,6 @@ import markdownEscape from 'markdown-escape'; import { Glow } from '../components/AllStatsOverview/components/HeroStat/components/Glow'; import CommandWrapper from '../components/CommandWrapper'; import { DeltaCaret } from '../components/DeltaCaret'; -import NoData from '../components/NoData'; import TitleBar from '../components/TitleBar'; import { getAccountInfo } from '../core/blitz/getAccountInfo'; import { getClanAccountInfo } from '../core/blitz/getClanAccountInfo'; @@ -333,156 +332,150 @@ export const ratingCommand = new Promise((resolve) => { )} - {delta.battles === 0 && ( - - )} - - {delta.battles > 0 && ( -
-
+
+ - - {delta.battles.toLocaleString(interaction.locale)} - - - Battles - -
-
+ - - {(100 * (delta.wins / delta.battles)).toFixed(0)}% - - - Winrate - -
-
- - {Math.round(delta.damage / delta.battles).toLocaleString( - interaction.locale, - )} - - - Damage - -
-
- - {(100 * (delta.survived / delta.battles)).toFixed(0)}% - - - Survival - -
-
- - {(delta.kills / delta.battles).toFixed(2)} - - - Kills - -
+ Battles +
- )} +
+ + {(100 * (delta.wins / delta.battles)).toFixed(0)}% + + + Winrate + +
+
+ + {Math.round(delta.damage / delta.battles).toLocaleString( + interaction.locale, + )} + + + Damage + +
+
+ + {(100 * (delta.survived / delta.battles)).toFixed(0)}% + + + Survival + +
+
+ + {(delta.kills / delta.battles).toFixed(2)} + + + Kills + +
+
); },