import { ReactElement } from "react"; import { useStateContext } from "./store"; import { Form } from "react-bootstrap"; import { ActionType } from "./reducer"; import { strings } from "./strings"; import { FormatString } from "./utils"; export const Params = (): ReactElement => { const { state, dispatch } = useStateContext(); const pausedispatcher = (e: React.ChangeEvent) => dispatch({ type: ActionType.setPause, payload: Number(e.target.value)}) const countdispatcher = (e: React.ChangeEvent) => dispatch({ type: ActionType.setCount, payload: Number(e.target.value)}) return <> {strings.sylCount} {state.sylCount} { FormatString( strings.pauseFormat , state.sylPause!.toString() )} }