/* * Copyright (c) 2015 Nordic Semiconductor ASA * * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause */ import React, { type FC } from 'react'; import Modal from 'react-bootstrap/Modal'; import { useSelector } from 'react-redux'; import { globalShortcuts, localShortcuts } from '../About/shortcutSlice'; import ShortcutItem from './ShortcutItem'; import './Shortcut-modal.scss'; export interface Props { isVisible: boolean; onCancel: () => void; } const ShortcutModal: FC = ({ isVisible, onCancel }) => { const local = useSelector(localShortcuts); const global = useSelector(globalShortcuts); return (

Shortcuts

<> {local.length > 0 && (

In this app

{local.map(shortcut => ( ))}
)}

In all apps

{global.map(shortcut => ( ))}
); }; export default ShortcutModal;