mirror of
https://github.com/ershisan99/www.git
synced 2025-12-17 05:19:23 +00:00
fix logs
This commit is contained in:
@@ -166,9 +166,17 @@ function PvpHandScoresTable({
|
||||
}
|
||||
|
||||
// Sort hand scores by timestamp to maintain chronological order
|
||||
const sortedHandScores = [...handScores].sort(
|
||||
(a, b) => a.timestamp.getTime() - b.timestamp.getTime()
|
||||
)
|
||||
const sortedHandScores = [...handScores].sort((a, b) => {
|
||||
const aTime =
|
||||
a.timestamp instanceof Date
|
||||
? a.timestamp.getTime()
|
||||
: new Date(a.timestamp).getTime()
|
||||
const bTime =
|
||||
b.timestamp instanceof Date
|
||||
? b.timestamp.getTime()
|
||||
: new Date(b.timestamp).getTime()
|
||||
return aTime - bTime
|
||||
})
|
||||
|
||||
// Group hand scores by player and filter out zero scores
|
||||
const logOwnerScores = sortedHandScores.filter((score) => score.isLogOwner)
|
||||
|
||||
@@ -883,7 +883,7 @@ export default function LogParser() {
|
||||
}
|
||||
}
|
||||
|
||||
setParsedGames(convertDates(games))
|
||||
setParsedGames(games)
|
||||
} catch (err) {
|
||||
console.error('Error parsing log:', err)
|
||||
setError(
|
||||
|
||||
Reference in New Issue
Block a user