import React from 'react'; import PropTypes from 'prop-types'; import QRCode from 'qrcode.react'; import { Button, Popover, PopoverBody } from 'reactstrap'; import { gettext } from '../utils/constants'; import '../css/btn-qr-code.css'; const propTypes = { link: PropTypes.string.isRequired }; class ButtonQR extends React.Component { constructor(props) { super(props); this.state = { isPopoverOpen: false }; this.btnID = 'btn-' + Math.random().toString().substr(2,5); } togglePopover = () => { this.setState({ isPopoverOpen: !this.state.isPopoverOpen }); } render() { const { link } = this.props; const { isPopoverOpen } = this.state; return (

{gettext('Scan the QR code to view the shared content directly')}

); } } ButtonQR.propTypes = propTypes; export default ButtonQR;