feat: updated full stats

This commit is contained in:
TrèsAbhi committed 2023-10-11 18:57:51 -05:00
1 parent d2668974f7
commit d062a0da1b
7 files changed
+99 -246

No files matched your search

+5 -4
View File
@@ -29,7 +29,7 @@ import resolvePlayerFromCommand, {
} from '../core/discord/resolvePlayerFromCommand';
import { CommandRegistryRaw } from '../events/interactionCreate';
export default async function render(
async function render(
{ region, id }: ResolvedPlayer,
{ start, end, name }: ResolvedPeriod,
filters: StatFilters,
@@ -39,17 +39,18 @@ export default async function render(
const clanImage = clan ? getClanLogo(clan.emblem_set_id) : undefined;
const diffedTankStats = await getDiffedTankStats(region, id, start, end);
const { stats, supplementary } = await filterStats(diffedTankStats, filters);
const filterDescriptions = await filtersToDescription(filters);
return (
<Wrapper>
<TitleBar
name={nickname}
image={clanImage}
description={`${name} • ${await filtersToDescription(filters)}`}
description={`${name} • ${filterDescriptions}`}
/>
{!stats?.battles && <NoData type={NoDataType.BattlesInPeriod} />}
{stats?.battles > 0 && (
{!stats.battles && <NoData type={NoDataType.BattlesInPeriod} />}
{stats.battles > 0 && (
<AllStatsOverview stats={stats} supplementaryStats={supplementary} />
)}
</Wrapper>