diff --git a/src/app/(home)/log-parser/_components/pvp-blinds.tsx b/src/app/(home)/log-parser/_components/pvp-blinds.tsx index d7fe975..39817c2 100644 --- a/src/app/(home)/log-parser/_components/pvp-blinds.tsx +++ b/src/app/(home)/log-parser/_components/pvp-blinds.tsx @@ -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) diff --git a/src/app/(home)/log-parser/page.tsx b/src/app/(home)/log-parser/page.tsx index 7d1e3cd..6c94948 100644 --- a/src/app/(home)/log-parser/page.tsx +++ b/src/app/(home)/log-parser/page.tsx @@ -883,7 +883,7 @@ export default function LogParser() { } } - setParsedGames(convertDates(games)) + setParsedGames(games) } catch (err) { console.error('Error parsing log:', err) setError(