2018-07-27 18:05:09 +02:00
|
|
|
import { Modal, ModalBody, ModalHeader } from 'reactstrap';
|
2020-01-15 18:16:12 +01:00
|
|
|
import { ExternalLink } from 'react-external-link';
|
2020-08-30 09:59:14 +02:00
|
|
|
import { ShortUrlModalProps } from '../data';
|
2018-07-27 18:05:09 +02:00
|
|
|
import './QrCodeModal.scss';
|
|
|
|
|
2020-08-30 09:59:14 +02:00
|
|
|
const QrCodeModal = ({ shortUrl: { shortUrl }, toggle, isOpen }: ShortUrlModalProps) => (
|
2018-11-01 13:15:09 +01:00
|
|
|
<Modal isOpen={isOpen} toggle={toggle} centered>
|
|
|
|
<ModalHeader toggle={toggle}>
|
2020-08-30 09:59:14 +02:00
|
|
|
QR code for <ExternalLink href={shortUrl}>{shortUrl}</ExternalLink>
|
2018-11-01 13:15:09 +01:00
|
|
|
</ModalHeader>
|
|
|
|
<ModalBody>
|
|
|
|
<div className="text-center">
|
2020-08-30 09:59:14 +02:00
|
|
|
<img src={`${shortUrl}/qr-code`} className="qr-code-modal__img" alt="QR code" />
|
2018-11-01 13:15:09 +01:00
|
|
|
</div>
|
|
|
|
</ModalBody>
|
|
|
|
</Modal>
|
|
|
|
);
|
2018-08-25 23:39:27 +02:00
|
|
|
|
2018-11-01 12:35:51 +01:00
|
|
|
export default QrCodeModal;
|