From 10a6f8371dcce45e075dcf8e813035b7707b4c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sat, 30 Mar 2024 12:33:17 -0500 Subject: [PATCH] fix: 0 battle handling --- src/commands/rating.tsx | 276 ++++++++++++++++++++-------------------- 1 file changed, 139 insertions(+), 137 deletions(-) diff --git a/src/commands/rating.tsx b/src/commands/rating.tsx index 65b56b45b..8a45b5243 100644 --- a/src/commands/rating.tsx +++ b/src/commands/rating.tsx @@ -341,150 +341,152 @@ export const ratingCommand = new Promise((resolve) => { )} -
-
- 0 && ( +
+
- {delta.battles.toLocaleString(interaction.locale)} - - + {delta.battles.toLocaleString(interaction.locale)} + + + Battles + +
+
- 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 + +
-
- - {(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 - -
-
+ )} ); },