feat: filter functionality

This commit is contained in:
TresAbhi committed 2023-08-04 19:49:40 +00:00
1 parent a734a71d2f
commit 909cabd517
7 files changed
+143 -91

No files matched your search

+4 -4
View File
@@ -1,11 +1,11 @@
import { TreeType } from '../../components/Tanks';
import { TreeTypeEnum } from '../../components/Tanks';
import { tankopedia } from './tankopedia';
export default async function getTreeType(id: number) {
const entry = (await tankopedia)[id];
if (entry?.is_collectible) return TreeType.Collector;
if (entry?.is_premium) return TreeType.Premium;
if (entry?.is_collectible) return TreeTypeEnum.Collector;
if (entry?.is_premium) return TreeTypeEnum.Premium;
return TreeType.TechTree;
return TreeTypeEnum.TechTree;
}