mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 15:05:35 +00:00
10 lines
195 B
TypeScript
10 lines
195 B
TypeScript
import { useCallback } from 'react';
|
|
|
|
export default function useAutoFocus() {
|
|
return useCallback((inputElement: any) => {
|
|
if (inputElement) {
|
|
inputElement.focus();
|
|
}
|
|
}, []);
|
|
}
|