@@ -49,7 +49,7 @@ function MarkReactionForm({ onSubmitted }) {
4949 }
5050
5151 function startSegment ( ) {
52- if ( segmentFull || segmentStart ) {
52+ if ( segmentFull || segmentStart !== null ) {
5353 return ;
5454 }
5555
@@ -62,7 +62,7 @@ function MarkReactionForm({ onSubmitted }) {
6262 }
6363
6464 function endSegment ( ) {
65- if ( segmentFull || ! segmentStart ) {
65+ if ( segmentFull || segmentStart === null ) {
6666 return ;
6767 }
6868
@@ -104,7 +104,7 @@ function MarkReactionForm({ onSubmitted }) {
104104 return false ;
105105 }
106106
107- if ( segmentFull === false && ( ! segmentStart || ! segmentEnd ) ) {
107+ if ( segmentFull === false && ( segmentStart === null || segmentEnd === null ) ) {
108108 return false ;
109109 }
110110
@@ -166,22 +166,22 @@ function MarkReactionForm({ onSubmitted }) {
166166 < div className = "mt-4 flex gap-4" >
167167 < Button
168168 color = "primary"
169- disabled = { ! ! segmentStart }
169+ disabled = { segmentStart !== null }
170170 className = "w-full"
171171 onClick = { ( ) => startSegment ( ) }
172172 >
173- { segmentStart ? prettyDuration ( segmentStart ) : `Start at ${ prettyDuration ( playerProgress ) } ` }
173+ { segmentStart !== null ? prettyDuration ( segmentStart ) : `Start at ${ prettyDuration ( playerProgress ) } ` }
174174 </ Button >
175175 < Button
176176 color = "primary"
177177 className = "w-full"
178- disabled = { ! ! segmentEnd || ! segmentStart }
178+ disabled = { segmentEnd !== null || segmentStart === null }
179179 onClick = { ( ) => endSegment ( ) }
180180 usePx = { false }
181181 >
182- { segmentEnd && prettyDuration ( segmentEnd ) }
183- { ( ! segmentEnd && segmentStart ) && `End at ${ prettyDuration ( playerProgress ) } ` }
184- { ( ! segmentEnd && ! segmentStart ) && 'End Segment' }
182+ { segmentEnd !== null && prettyDuration ( segmentEnd ) }
183+ { ( segmentEnd === null && segmentStart !== null ) && `End at ${ prettyDuration ( playerProgress ) } ` }
184+ { ( segmentEnd === null && segmentStart === null ) && 'End Segment' }
185185 </ Button >
186186 </ div >
187187 </ >
0 commit comments