Clean up comments, single quote component name

This commit is contained in:
Peter 2024-11-15 17:24:29 -06:00
parent e911801d15
commit 62ce330d42
2 changed files with 1 additions and 14 deletions

View File

@ -74,7 +74,7 @@ import { aggregateBattingStats, type BattingStat } from '@/services/battingStats
import type { PropType } from 'vue' import type { PropType } from 'vue'
export default { export default {
name: "PlayerBattingSummaryTable", name: 'PlayerBattingSummaryTable',
props: { props: {
currentSeasonBatting: { type: Object as PropType<BattingStat>, required: false }, currentSeasonBatting: { type: Object as PropType<BattingStat>, required: false },
currentPostSeasonBatting: { type: Object as PropType<BattingStat>, required: false }, currentPostSeasonBatting: { type: Object as PropType<BattingStat>, required: false },

View File

@ -198,22 +198,9 @@ export default {
} }
return seasonStats.sort((s1, s2) => s2[this.sortKey] < s1[this.sortKey] ? this.sortOrder : -1 * this.sortOrder) return seasonStats.sort((s1, s2) => s2[this.sortKey] < s1[this.sortKey] ? this.sortOrder : -1 * this.sortOrder)
// return seasonStats.sort((s1, s2) => {
// return s1.seasonNumber - s2.seasonNumber === 0
// ? s1.isRegularSeason
// ? -1
// : 1
// : s1.seasonNumber - s2.seasonNumber
// })
}, },
}, },
methods: { methods: {
// setKey(stat: keyof PitchingStatWithSeason): void {
// this.setKey(stat)
// this.pitchingStats.sort((s1, s2) => s2[stat] < s1[stat] ? this.sortOrder : -1 * this.sortOrder)
// },
setKey(stat: keyof PitchingStatWithSeason): void { setKey(stat: keyof PitchingStatWithSeason): void {
if (this.sortKey === stat) { if (this.sortKey === stat) {
// if key currently selected, flip sort order // if key currently selected, flip sort order