2018-09-12 18:42:15 +02:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
import { Modal } from 'modal/modal';
|
|
|
|
import SocialShare from 'component/socialShare';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
closeModal: () => void,
|
|
|
|
uri: string,
|
2019-10-29 17:23:56 +01:00
|
|
|
webShareable: boolean,
|
2018-11-09 16:34:48 +01:00
|
|
|
isChannel: boolean,
|
2018-09-12 18:42:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class ModalSocialShare extends React.PureComponent<Props> {
|
|
|
|
render() {
|
2019-10-29 17:23:56 +01:00
|
|
|
const { closeModal, uri, webShareable, isChannel } = this.props;
|
2018-09-12 18:42:15 +02:00
|
|
|
return (
|
2018-09-26 19:48:07 +02:00
|
|
|
<Modal isOpen onAborted={closeModal} type="custom" title={__('Share')}>
|
2019-10-29 17:23:56 +01:00
|
|
|
<SocialShare uri={uri} onDone={closeModal} webShareable={webShareable} isChannel={isChannel} />
|
2018-09-12 18:42:15 +02:00
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ModalSocialShare;
|