mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
feat: class and type sorting
This commit is contained in:
1 parent
d6e37119a8
commit
ee1ecb83b7
3 files changed
+5
-2
No files matched your search
@@ -27,7 +27,7 @@ export function TankCard({ id }: TankCardProps) {
|
||||
<div
|
||||
className={styles.flag}
|
||||
style={{
|
||||
backgroundImage: `url(/api/nations/${tank.tank!.nation}.webp)`,
|
||||
backgroundImage: `url(/api/nations/${tank.tank!.nation}/card.webp)`,
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@ function Content() {
|
||||
const tanksOrdered = useMemo(() => {
|
||||
let list = Object.values(tanks.tanks);
|
||||
|
||||
list = list.sort((a, b) => a.tank!.tank_type - b.tank!.tank_type);
|
||||
list = list.sort((a, b) => a.tank!.tank_class - b.tank!.tank_class);
|
||||
list = list.sort((a, b) => a.tank!.nation - b.tank!.nation);
|
||||
list = list.sort((a, b) =>
|
||||
compareTiers(a.tank!.tier_catalog_id, b.tank!.tier_catalog_id),
|
||||
);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { Nation } from "@protos/game/proto/legacy/blitz_static_tank_component";
|
||||
import type { APIContext, GetStaticPaths } from "astro";
|
||||
import { game } from "../../../core/game/game";
|
||||
import { game } from "../../../../core/game/game";
|
||||
|
||||
export const getStaticPaths = (async () => {
|
||||
return Object.values(Nation)
|
||||
Reference in new issue
Block a user