From e81c0cbc1e1dd52b6bf3c56880f9ad2e45e3fe31 Mon Sep 17 00:00:00 2001 From: tresabhi Date: Wed, 28 Jun 2023 19:34:35 +0000 Subject: [PATCH] feat: footer for stats --- src/commands/evolution.tsx | 2 +- src/commands/stats.tsx | 2 +- src/commands/statsfull.tsx | 2 +- src/commands/today.tsx | 2 +- src/components/PoweredBy.tsx | 2 +- src/renderers/stats.tsx | 15 ++++++++++++++- src/routers/stats.tsx | 2 +- 7 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/commands/evolution.tsx b/src/commands/evolution.tsx index 020c60fd5..62123fa81 100644 --- a/src/commands/evolution.tsx +++ b/src/commands/evolution.tsx @@ -20,7 +20,7 @@ import { AccountInfo } from '../types/accountInfo.js'; export default { inProduction: true, - inDevelopment: true, + inDevelopment: false, inPublic: true, command: addStatTypeSubCommandGroups( diff --git a/src/commands/stats.tsx b/src/commands/stats.tsx index 4f29fbda2..2c92ae620 100644 --- a/src/commands/stats.tsx +++ b/src/commands/stats.tsx @@ -20,7 +20,7 @@ import { AccountInfo } from '../types/accountInfo.js'; export default { inProduction: true, - inDevelopment: true, + inDevelopment: false, inPublic: true, command: addStatTypeSubCommandGroups( diff --git a/src/commands/statsfull.tsx b/src/commands/statsfull.tsx index 2eedd49b5..1683abb8d 100644 --- a/src/commands/statsfull.tsx +++ b/src/commands/statsfull.tsx @@ -19,7 +19,7 @@ import { AccountInfo } from '../types/accountInfo.js'; export default { inProduction: true, - inDevelopment: true, + inDevelopment: false, inPublic: true, command: addStatTypeSubCommandGroups( diff --git a/src/commands/today.tsx b/src/commands/today.tsx index 86587df48..950297142 100644 --- a/src/commands/today.tsx +++ b/src/commands/today.tsx @@ -14,7 +14,7 @@ import { AccountInfo } from '../types/accountInfo.js'; export default { inProduction: true, - inDevelopment: true, + inDevelopment: false, inPublic: true, command: new SlashCommandBuilder() diff --git a/src/components/PoweredBy.tsx b/src/components/PoweredBy.tsx index aeedde2b6..fc376f057 100644 --- a/src/components/PoweredBy.tsx +++ b/src/components/PoweredBy.tsx @@ -25,7 +25,7 @@ const POWERED_BY_NAMES: Record = { export default function PoweredBy({ type, footer }: PoweredByProps) { return (
-
{footer}
+
{footer}
diff --git a/src/renderers/stats.tsx b/src/renderers/stats.tsx index 60f40e567..bbcfb9629 100644 --- a/src/renderers/stats.tsx +++ b/src/renderers/stats.tsx @@ -15,6 +15,7 @@ import { tankAverages } from '../core/blitzstars/tankAverages.js'; import { ResolvedPeriod } from '../core/discord/resolvePeriodFromCommand.js'; import { ResolvedPlayer } from '../core/discord/resolvePlayerFromCommand.js'; import { WARGAMING_APPLICATION_ID } from '../core/node/arguments.js'; +import { theme } from '../stitches.config.js'; import { AccountInfo, AllStats, @@ -127,6 +128,18 @@ export default async function stats( const overview = ( ); + const footer = ( + + /statsfull for all statistics + + ); return naked ? ( overview @@ -144,7 +157,7 @@ export default async function stats( {stats.battles === 0 && } {stats.battles > 0 && overview} - + ); } diff --git a/src/routers/stats.tsx b/src/routers/stats.tsx index dc8c5c661..c6e5c30f0 100644 --- a/src/routers/stats.tsx +++ b/src/routers/stats.tsx @@ -6,7 +6,7 @@ import { RouterRegistry } from '../server.js'; export default { route: '/stats/:type/:period', inProduction: true, - inDevelopment: true, + inDevelopment: false, async handler(req) { const type = req.params.type as StatType;