|
@@ -13,7 +13,7 @@ const CountdownButton = ({
|
|
|
|
|
|
return (
|
|
return (
|
|
<button className={buttonClass} autoFocus={autoFocus} onClick={() => { pause(); onCancelled(); }}>
|
|
<button className={buttonClass} autoFocus={autoFocus} onClick={() => { pause(); onCancelled(); }}>
|
|
- {remaining !== 0 ? formatter(remaining) : "Starting!"}
|
|
|
|
|
|
+ {formatter(remaining)}
|
|
</button>
|
|
</button>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -31,9 +31,9 @@ const DelayedButton = ({
|
|
return delayed
|
|
return delayed
|
|
? <CountdownButton
|
|
? <CountdownButton
|
|
onCancelled={() => setDelayed(false)}
|
|
onCancelled={() => setDelayed(false)}
|
|
- onEnd={() => { setDelayed(false); onEnd(); }}
|
|
|
|
|
|
+ onEnd={onEnd}
|
|
formatter={countDownFormatter ?? JSON.stringify}
|
|
formatter={countDownFormatter ?? JSON.stringify}
|
|
- seconds={seconds ?? 5}
|
|
|
|
|
|
+ seconds={seconds ?? 3}
|
|
autoFocus={autoFocus}
|
|
autoFocus={autoFocus}
|
|
buttonClass={buttonClass}
|
|
buttonClass={buttonClass}
|
|
/>
|
|
/>
|