Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnu-narayanan committed Feb 23, 2024
1 parent 7efa87e commit cc2dbfa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ export const convertSecondsToTimeUnit = (
seconds: number,
unitNames: { minute: string; hour: string; day: string }
) => {
if (seconds === null || seconds === 0)
return { time: '', unit: ''};
if (seconds === null || seconds === 0) return { time: '', unit: '' };
if (seconds < 3600)
return { time: Number((seconds / 60).toFixed(1)), unit: unitNames.minute };
if (seconds < 86400)
Expand Down

0 comments on commit cc2dbfa

Please sign in to comment.