|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import React, { useCallback } from 'react'
|
|
|
|
|
import React from 'react'
|
|
|
|
|
import { useSelector, useDispatch } from 'react-redux'
|
|
|
|
|
import { debounce } from 'debounce'
|
|
|
|
|
|
|
|
|
@ -12,15 +12,13 @@ export const Options = () => {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<h2>Options</h2>
|
|
|
|
|
<Slider
|
|
|
|
|
title={'Maximum segment length'}
|
|
|
|
|
min={3}
|
|
|
|
|
max={15}
|
|
|
|
|
value={maxLength}
|
|
|
|
|
onChange={useCallback(
|
|
|
|
|
debounce(val => dispatch(setMaxLength(val)), 100, true),
|
|
|
|
|
[dispatch]
|
|
|
|
|
)}
|
|
|
|
|
onChange={debounce(val => dispatch(setMaxLength(val)), 100)}
|
|
|
|
|
/>
|
|
|
|
|
<Slider
|
|
|
|
|
title={'Words per minute'}
|
|
|
|
|