Skip to content

Commit

Permalink
Update index.tsx (#579)
Browse files Browse the repository at this point in the history
bugfix: BPM Sort Function
  • Loading branch information
ElvisZhu authored Dec 20, 2023
1 parent 57c3360 commit 7938c44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/RunTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const RunTable = ({
: b.average_speed - a.average_speed;
const sortBPMFunc: SortFunc = (a, b) => {
return sortFuncInfo === 'BPM'
? a.average_heartrate ?? 0 - (b.average_heartrate ?? 0)
: b.average_heartrate ?? 0 - (a.average_heartrate ?? 0);
? (a.average_heartrate ?? 0) - (b.average_heartrate ?? 0)
: (b.average_heartrate ?? 0) - (a.average_heartrate ?? 0);
};
const sortRunTimeFunc: SortFunc = (a, b) => {
const aTotalSeconds = convertMovingTime2Sec(a.moving_time);
Expand Down

1 comment on commit 7938c44

@vercel
Copy link

@vercel vercel bot commented on 7938c44 Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

running-page – ./

running-page-git-master-yihong0618.vercel.app
running-page-yihong0618.vercel.app
running-page.vercel.app

Please sign in to comment.