From 533bfc44588532ee1e4543ad69d571d6d9435965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:16:23 -0500 Subject: [PATCH] fix: clan images --- docs/changelogs/1.14.0.md | 5 +++++ src/commands/breakdown.tsx | 2 +- src/commands/evolution.tsx | 2 +- src/commands/fullStats.tsx | 2 +- src/commands/ownedTanks.tsx | 2 +- src/commands/ratings.tsx | 1 + src/commands/stats.tsx | 4 +++- 7 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 docs/changelogs/1.14.0.md diff --git a/docs/changelogs/1.14.0.md b/docs/changelogs/1.14.0.md new file mode 100644 index 000000000..6efbf0bd2 --- /dev/null +++ b/docs/changelogs/1.14.0.md @@ -0,0 +1,5 @@ +# Blitzkrieg 1.14.0 + +Elegance has never been met like this before + +## Features diff --git a/src/commands/breakdown.tsx b/src/commands/breakdown.tsx index 170900c77..477b158f4 100644 --- a/src/commands/breakdown.tsx +++ b/src/commands/breakdown.tsx @@ -45,7 +45,7 @@ async function render( const statsInPeriod = await getStatsInPeriod(region, id, start, end); const { filteredOrder } = await filterStats(statsInPeriod, filters); const accountInfo = await getAccountInfo(region, id); - const clanData = await getClanAccountInfo(region, id); + const clanData = await getClanAccountInfo(region, id, ['clan']); const tankStats = await getTankStats(region, id); const filterDescriptions = await filtersToDescription(filters); const orderedCurrentStats: AllStats[] = []; diff --git a/src/commands/evolution.tsx b/src/commands/evolution.tsx index d6ec480fb..b495076e4 100644 --- a/src/commands/evolution.tsx +++ b/src/commands/evolution.tsx @@ -40,7 +40,7 @@ async function render( tankId: number | null, ) { const accountInfo = await getAccountInfo(region, id); - const clan = (await getClanAccountInfo(region, id))?.clan; + const clan = (await getClanAccountInfo(region, id, ['clan']))?.clan; const logo = clan ? emblemIdToURL(clan.emblem_set_id) : undefined; const histories = await (type === 'player' ? getPlayerHistories(region, id, { diff --git a/src/commands/fullStats.tsx b/src/commands/fullStats.tsx index 9630433f9..f9262602a 100644 --- a/src/commands/fullStats.tsx +++ b/src/commands/fullStats.tsx @@ -37,7 +37,7 @@ async function render( filters: StatFilters, ) { const { nickname } = await getAccountInfo(region, id); - const clan = (await getClanAccountInfo(region, id))?.clan; + const clan = (await getClanAccountInfo(region, id, ['clan']))?.clan; const clanImage = clan ? emblemIdToURL(clan.emblem_set_id) : undefined; const diffedTankStats = await getStatsInPeriod(region, id, start, end); const { stats, supplementary, filteredOrder } = await filterStats( diff --git a/src/commands/ownedTanks.tsx b/src/commands/ownedTanks.tsx index 6b6878ab9..8f731590e 100644 --- a/src/commands/ownedTanks.tsx +++ b/src/commands/ownedTanks.tsx @@ -46,7 +46,7 @@ export const ownedTanksCommand: CommandRegistry = { })), ) ).filter((tank) => tank.tankopedia?.tier === tier); - const clanAccountInfo = await getClanAccountInfo(server, id); + const clanAccountInfo = await getClanAccountInfo(server, id, ['clan']); const groupedTanks: Record = {}; const nations: string[] = []; diff --git a/src/commands/ratings.tsx b/src/commands/ratings.tsx index f7ed5b22e..647507ed0 100644 --- a/src/commands/ratings.tsx +++ b/src/commands/ratings.tsx @@ -313,6 +313,7 @@ export const ratingsCommand = new Promise( const clanData = await getClanAccountInfo( region, trimmed.map(({ id }) => id), + ['clan'], ); return trimmed.map( diff --git a/src/commands/stats.tsx b/src/commands/stats.tsx index f2cad10df..f95a8aa30 100644 --- a/src/commands/stats.tsx +++ b/src/commands/stats.tsx @@ -35,12 +35,14 @@ async function render( filters: StatFilters, ) { const { nickname } = await getAccountInfo(region, id); - const clan = (await getClanAccountInfo(region, id))?.clan; + const clan = (await getClanAccountInfo(region, id, ['clan']))?.clan; const clanImage = clan ? emblemIdToURL(clan.emblem_set_id) : undefined; const diffedTankStats = await getStatsInPeriod(region, id, start, end); const { stats, supplementary } = await filterStats(diffedTankStats, filters); const filterDescriptions = await filtersToDescription(filters); + console.log(clan); + return (