feat: extracted renderer from /stats

This commit is contained in:
TresAbhi committed 2023-06-23 01:35:15 +00:00
1 parent bcbc1e259f
commit 752f9b339b
21 files changed
+329 -273

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
import { BlitzServer } from '../../constants/servers.js';
import { AllStats } from '../../types/accountInfo.js';
import getTankHistories, {
TankHistoriesRaw,
TankHistories,
TankHistoryRaw,
} from './getTankHistories.js';
@@ -45,7 +45,7 @@ export default async function getTankStatsOverTime(
});
// sort them even though most won't be used
const tankSortedHistory: Record<number, TankHistoriesRaw> = {};
const tankSortedHistory: Record<number, TankHistories> = {};
const tankIds: number[] = [];
history.forEach((node) => {
if (!tankSortedHistory[node.tank_id]) {