Skip to content

Commit

Permalink
added assets and a formatting utility function b00tc4mp#175
Browse files Browse the repository at this point in the history
  • Loading branch information
breadislife committed Sep 9, 2024
1 parent 1184197 commit e302f46
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions staff/daniel-hernandez/project/app/src/services/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import signOut from './auth/signOut';
import checkEmail from './auth/checkEmail';
import search from './search';

export { signIn, signUp, signOut, checkEmail, search };

export default {
signIn,
signUp,
Expand Down
18 changes: 18 additions & 0 deletions staff/daniel-hernandez/project/app/src/utils/formatSeconds.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const formatSeconds = totalSeconds => {
if (totalSeconds < 0) return '00:00';

const hours = Math.floor(totalSeconds / 3600);
const minutes = Math.floor((totalSeconds % 3600) / 60);
const seconds = totalSeconds % 60;

const formattedMinutes = minutes.toString().padStart(2, '0');
const formattedSeconds = seconds.toString().padStart(2, '0');

if (hours > 0) {
const formattedHours = hours.toString().padStart(2, '0');
return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;
}
return `${formattedMinutes}:${formattedSeconds}`;
};

export default formatSeconds;

0 comments on commit e302f46

Please sign in to comment.