import {QRCodeSVG} from 'qrcode.react'; import type {JSX} from 'react'; import {Dispatch, SetStateAction} from 'react'; import styles from './Modal.module.scss'; type Props = { link: string; setModalView: Dispatch>; }; function Modal({link, setModalView}: Props): JSX.Element { return ( <>
setModalView(false)} onKeyDown={(e): void => { if (e.key === 'Escape') setModalView(false); }} role="button" tabIndex={0} >
e.stopPropagation()} onKeyDown={(e): void => e.stopPropagation()} role="button" tabIndex={0} >
); } export default Modal;