Skip to content

Commit 07f4ff3

Browse files
committed
修复游戏图片显示错误和时长排序错误
1 parent efc3703 commit 07f4ff3

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

public/assets/images/tarkov.webp

96.3 KB
Loading

public/assets/orderGames.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
{
33
"name": "Escape from Tarkov",
44
"playtime_forever": 66000,
5-
"imgurl": "https://cdn.cloudflare.steamstatic.com/steam/apps/255710/header.jpg"
5+
"imgurl": "assets/images/tarkov.webp"
66
}
77
]

src/components/PlayedGames.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ for (const game of appidList) {
3434
});
3535
}
3636
37-
playedGames = playedGames.concat(orderGames).filter((game) => game.playtime_forever > 1000)
37+
playedGames = playedGames
38+
.concat(orderGames)
39+
.filter((game) => game.playtime_forever > 1000)
40+
.sort((a, b) => b.playtime_forever - a.playtime_forever);
3841
---
3942

4043
<div>

0 commit comments

Comments
 (0)