Fixed type error

This commit is contained in:
RockBacon9922 2022-07-11 12:40:32 +01:00
parent 31547db0ac
commit 61885dc2e9

View file

@ -69,7 +69,7 @@ export const TopBar: React.FC<TopBarProps> = (props) => {
let navigate = useNavigate();
//create function to focus on search box when cmd+k is pressed
const searchRef: any = React.useRef(null);
const searchRef = React.useRef<HTMLInputElement>(null);
React.useEffect(() => {
document.addEventListener('keydown', (e) => {
if (e.metaKey && e.key === 'k' && searchRef.current) {