import React, { useCallback } from 'react'; import PropTypes from 'prop-types'; import { useTranslation } from 'react-i18next'; import { Menu } from 'semantic-ui-react'; import { withPopup } from '../../lib/popup'; import { FilePicker, Popup } from '../../lib/custom-ui'; import styles from './AddAttachmentPopup.module.css'; const AddAttachmentStep = React.memo(({ onCreate, onClose }) => { const [t] = useTranslation(); const handleFileSelect = useCallback( (file) => { onCreate({ file, }); onClose(); }, [onCreate, onClose], ); return ( <> {t('common.addAttachment', { context: 'title', })} {t('common.fromComputer', { context: 'title', })} {t('common.pressPasteShortcutToAddAttachmentFromClipboard')} > ); }); AddAttachmentStep.propTypes = { onCreate: PropTypes.func.isRequired, onClose: PropTypes.func.isRequired, }; export default withPopup(AddAttachmentStep);