From 83527fed7d002fbad893cbffcc23490bb4ecc61b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com>
Date: Sun, 16 Jun 2024 17:47:02 -0500
Subject: [PATCH] feat: player stats card
---
src/app/page.tsx | 9 +++++----
src/constants/tools.tsx | 13 +++++++++++++
src/core/blitz/fetchBlitz.ts | 2 +-
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/app/page.tsx b/src/app/page.tsx
index e30978171..31a679642 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,12 +1,13 @@
'use client';
-import { Box, Flex } from '@radix-ui/themes';
+import { Flex } from '@radix-ui/themes';
import { Ad, AdType } from '../components/Ad';
import { AdMidSectionResponsive } from '../components/AdMidSectionResponsive';
import {
compareTool,
discordTool,
moreTool,
+ playerStatsTool,
ratingTool,
sessionTool,
tankopediaTool,
@@ -64,12 +65,12 @@ export default function Page() {
-
+
+
-
{!exempt && (
@@ -85,8 +86,8 @@ export default function Page() {
)}
+
-
diff --git a/src/constants/tools.tsx b/src/constants/tools.tsx
index 0df8a2e02..4ab52b6e7 100644
--- a/src/constants/tools.tsx
+++ b/src/constants/tools.tsx
@@ -94,10 +94,23 @@ export const moreTool: Tool = {
},
};
+export const playerStatsTool: Tool = {
+ id: 'player-stats',
+ title: 'Player stats',
+ description: 'Periodical player statistics',
+ pageDescription: 'Periodical player statistics in World of Tanks Blitz',
+ button: {
+ text: 'Lookup player',
+ color: 'blue',
+ },
+ image: 'YelSOfT',
+};
+
export const TOOLS: Tool[] = [
tankopediaTool,
ratingTool,
compareTool,
+ playerStatsTool,
sessionTool,
discordTool,
moreTool,
diff --git a/src/core/blitz/fetchBlitz.ts b/src/core/blitz/fetchBlitz.ts
index 76d0919c9..71b45ae5c 100644
--- a/src/core/blitz/fetchBlitz.ts
+++ b/src/core/blitz/fetchBlitz.ts
@@ -43,7 +43,7 @@ async function manageQueue() {
} else {
if (RETRY_ERRORS.includes(data.error.message)) {
console.log(
- `Encountered retry-able error ${data.error}, putting "${request.url}" back in queue...`,
+ `Encountered retry-able error ${data.error.code} ${data.error.message}, putting "${request.url}" back in queue...`,
);
retryAbleBlitzFetchEvent.emit(undefined);