const onEnterHandler = (event: React.KeyboardEvent, callback: Function) => { if (event.key === 'Enter') callback() } export default onEnterHandler