Skip to content

Commit

Permalink
fix: highlight best result
Browse files Browse the repository at this point in the history
  • Loading branch information
Baiqiang committed Dec 1, 2024
1 parent 647ac5e commit 1e9ef0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/weekly/results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const props = defineProps<{
results: Result[]
}>()
const showAverage = computed(() => props.results[0].values.length > 1)
const bests = computed(() => [0, 1, 2].map(i => Math.min(...props.results.map(result => result.values[i]))))
const bests = computed(() => [0, 1, 2].map(i => Math.min(...props.results.map(result => result.values[i]).filter(v => v > 0))))
const gridTemplate = computed(() => {
if (showAverage.value)
return `grid-cols-[3rem_max-content_4rem_2rem_2rem_2rem_minmax(2rem,1fr)]`
Expand Down

0 comments on commit 1e9ef0b

Please sign in to comment.