File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -67,11 +67,11 @@ export function useWorkoutTimer() {
6767 const shouldStart = status . value === Status . STOPPED ;
6868 if ( shouldStart ) {
6969 timestamp . current = Date . now ( ) ;
70- send ( statusEvents . START ) ;
70+ send ( { type : statusEvents . START } ) ;
7171 setTimeLeft ( addSeconds ( new Date ( 0 ) , PREP_TIME_SECONDS ) ) ;
7272 setRoundsLeft ( rounds ) ;
7373 } else {
74- send ( statusEvents . STOP ) ;
74+ send ( { type : statusEvents . STOP } ) ;
7575 }
7676 } , [ rounds , status , send ] ) ;
7777 React . useEffect ( ( ) => {
@@ -110,15 +110,15 @@ export function useWorkoutTimer() {
110110
111111 if ( shouldSwitchToWork ) {
112112 beepBreakLong . play ( ) ;
113- send ( statusEvents . WORK ) ;
113+ send ( { type : statusEvents . WORK } ) ;
114114 setTimeLeft ( workInterval ) ;
115115 setRoundsLeft ( prevRoundsLeft => prevRoundsLeft - 1 ) ;
116116 } else if ( shouldSwitchToRest ) {
117- send ( statusEvents . BREAK ) ;
117+ send ( { type : statusEvents . BREAK } ) ;
118118 setTimeLeft ( breakInterval ) ;
119119 beepWorkLong . play ( ) ;
120120 } else {
121- send ( statusEvents . STOP ) ;
121+ send ( { type : statusEvents . STOP } ) ;
122122 clearInterval ( interval ) ;
123123 }
124124 }
You can’t perform that action at this time.
0 commit comments