e5072c8681
* make repost into a modal * remove unecessary import * removed page/repost * fixed yarn lint errors * added page/repost back * added "Repost" title bar * fixed yarn lint errors
32 lines
888 B
JavaScript
32 lines
888 B
JavaScript
// @flow
|
|
import React from 'react';
|
|
import { Modal } from 'modal/modal';
|
|
import RepostCreate from 'component/repostCreate';
|
|
import Card from 'component/common/card';
|
|
|
|
type Props = {
|
|
closeModal: () => void,
|
|
uri: string,
|
|
name: string,
|
|
contentUri: string,
|
|
setContentUri: () => void,
|
|
repostUri: string,
|
|
setRepostUri: () => void,
|
|
}
|
|
|
|
class ModalRepost extends React.PureComponent<Props> {
|
|
render() {
|
|
const { closeModal, uri, name, contentUri, setContentUri, repostUri, setRepostUri } = this.props;
|
|
|
|
return (
|
|
<Modal onAborted={closeModal} isOpen type="card">
|
|
<Card
|
|
title={__('Repost')}
|
|
actions={<RepostCreate isModal uri={uri} name={name} onCancel={closeModal} contentUri={contentUri} setContentUri={setContentUri} repostUri={repostUri} setRepostUri={setRepostUri} />}
|
|
/>
|
|
</Modal>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default ModalRepost;
|