mirror of
https://github.com/ershisan99/www.git
synced 2025-12-28 12:34:47 +00:00
fix mmr display in chart
This commit is contained in:
@@ -28,9 +28,18 @@ export function MmrTrendChart({ games }: { games: SelectGames[] }) {
|
||||
.filter((game) => game.gameType === 'ranked')
|
||||
.map((game) => ({
|
||||
date: game.gameTime,
|
||||
mmr: game.playerMmr,
|
||||
mmr: game.playerMmr + game.mmrChange,
|
||||
mmrBefore: game.playerMmr,
|
||||
}))
|
||||
.sort((a, b) => a.date.getTime() - b.date.getTime())
|
||||
const firstGame = chartData[0]
|
||||
if (firstGame) {
|
||||
chartData.unshift({
|
||||
date: firstGame.date,
|
||||
mmr: firstGame.mmrBefore,
|
||||
mmrBefore: firstGame.mmrBefore,
|
||||
})
|
||||
}
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
|
||||
Reference in New Issue
Block a user