This commit is contained in:
2025-06-21 18:33:27 +02:00
parent 1a68d34c81
commit 0126770a0c
2 changed files with 12 additions and 4 deletions

View File

@@ -166,9 +166,17 @@ function PvpHandScoresTable({
} }
// Sort hand scores by timestamp to maintain chronological order // Sort hand scores by timestamp to maintain chronological order
const sortedHandScores = [...handScores].sort( const sortedHandScores = [...handScores].sort((a, b) => {
(a, b) => a.timestamp.getTime() - b.timestamp.getTime() 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 // Group hand scores by player and filter out zero scores
const logOwnerScores = sortedHandScores.filter((score) => score.isLogOwner) const logOwnerScores = sortedHandScores.filter((score) => score.isLogOwner)

View File

@@ -883,7 +883,7 @@ export default function LogParser() {
} }
} }
setParsedGames(convertDates(games)) setParsedGames(games)
} catch (err) { } catch (err) {
console.error('Error parsing log:', err) console.error('Error parsing log:', err)
setError( setError(