import React, { ReactNode } from 'react' import { useRecoilState } from 'recoil' import { shortcutsState } from '../../store/Atoms' import Modal from '../shared/Modal' interface Shortcut { content: string keys: string[] } function ShortCut(props: Shortcut) { const { content, keys } = props return (
{content}
{keys.map((k, index) => (
{k}
))}
) } const isMac = (function () { return /macintosh|mac os x/i.test(navigator.userAgent) })() const isWindows = (function () { return /windows|win32/i.test(navigator.userAgent) })() const CmdOrCtrl = isMac ? 'Cmd' : 'Ctrl' export default function ShortcutsModal() { const [shortcutsShow, setShortcutState] = useRecoilState(shortcutsState) const shortcutStateHandler = () => { setShortcutState(false) } return (
) }