fix: clan images

This commit is contained in:
TrèsAbhi committed 2023-10-16 20:16:23 -05:00
1 parent 1317c2879c
commit 533bfc4458
7 files changed
+13 -5

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
# Blitzkrieg 1.14.0
Elegance has never been met like this before
## Features
+1 -1
View File
@@ -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[] = [];
+1 -1
View File
@@ -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, {
+1 -1
View File
@@ -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(
+1 -1
View File
@@ -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<string, TankopediaEntry[]> = {};
const nations: string[] = [];
+1
View File
@@ -313,6 +313,7 @@ export const ratingsCommand = new Promise<CommandRegistryRaw>(
const clanData = await getClanAccountInfo(
region,
trimmed.map(({ id }) => id),
['clan'],
);
return trimmed.map(
+3 -1
View File
@@ -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 (
<Wrapper>
<TitleBar