File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,9 @@ interface IncomingLettersStore {
1717 fetchIncomingLetters : ( ) => void ;
1818}
1919
20- function formatTime ( time : number ) : string {
21- return time < 10 ? `0${ time } ` : `${ time } ` ;
22- }
20+ const formatTime = ( time : number ) : string => ( time < 10 ? `0${ time } ` : `${ time } ` ) ;
2321
24- function calculatingRemainingTime ( deliveryCompletedAt : string ) : string {
22+ const calculatingRemainingTime = ( deliveryCompletedAt : string ) : string => {
2523 const completedAt = new Date ( deliveryCompletedAt ) . getTime ( ) ;
2624 const now = new Date ( ) . getTime ( ) ;
2725 const diff = completedAt - now ;
@@ -33,7 +31,7 @@ function calculatingRemainingTime(deliveryCompletedAt: string): string {
3331 const seconds = Math . floor ( ( diff % ( 1000 * 60 ) ) / 1000 ) ;
3432
3533 return `${ formatTime ( hours ) } :${ formatTime ( minutes ) } :${ formatTime ( seconds ) } ` ;
36- }
34+ } ;
3735
3836export const useIncomingLettersStore = create < IncomingLettersStore > ( ( set ) => ( {
3937 data : [ ] ,
You can’t perform that action at this time.
0 commit comments