Skip to content

Commit

Permalink
fix: make SolveTimeLabel treat a very big int as dnf
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdancho committed Aug 26, 2024
1 parent 940c52d commit 503a81a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/shared/SolveTimeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ export const SolveTimeLabel = forwardRef<HTMLSpanElement, SolveTimeLabelProps>(
({ timeMs, isDnf = false, isPlaceholder = false, isAverage, className, ...props }, ref) => {
let variant: 'average' | 'dnf' | undefined

if (timeMs === 2147483647) {
isDnf = true
}

if (isDnf) {
variant = 'dnf'
} else if (isAverage) {
Expand Down

0 comments on commit 503a81a

Please sign in to comment.