import React, { Component } from 'react';
import hocImmutable, { imShallowEqual } from '../../utils/HOC/hocImmutable';
import CopyToClipboard from 'react-copy-to-clipboard';

export default hocImmutable(class extends Component {
    constructor(props) {
        super(props)
    }
    onCopy = (text, result) => {
        const { onCopy } = this.props;
        onCopy && onCopy(result, text);
    }
    render() {
        const { onCopy, ...props } = this.props;
        return <CopyToClipboard {...props}
            onCopy={this.onCopy}
        />
    }
});