const focusRef = (ref: React.Ref | undefined) => { if (typeof ref === 'object' && ref?.current) { ref.current.focus() } } export default focusRef