import React from 'react' import { useKeyPressEvent } from 'react-use' import { useRecoilState } from 'recoil' import { shortcutsState } from '../../store/Atoms' import Button from '../shared/Button' const Shortcuts = () => { const [shortcutVisibility, setShortcutState] = useRecoilState(shortcutsState) const shortcutStateHandler = () => { setShortcutState(prevShortcutState => { return !prevShortcutState }) } useKeyPressEvent('h', ev => { ev?.preventDefault() shortcutStateHandler() }) return (
) } export default Shortcuts