fix: publish success modal navigation

This commit is contained in:
Sean Yesmunt 2019-04-10 17:27:12 -04:00
parent 08b30fe0f2
commit 19906171c8
2 changed files with 5 additions and 3 deletions

View file

@ -2,10 +2,12 @@ import { connect } from 'react-redux';
import { doHideModal } from 'redux/actions/app';
import ModalSendTip from './view';
import { doClearPublish } from 'redux/actions/publish';
import { push } from 'connected-react-router';
const perform = dispatch => ({
closeModal: () => dispatch(doHideModal()),
clearPublish: () => dispatch(doClearPublish()),
navigate: path => dispatch(push(path)),
});
export default connect(

View file

@ -9,7 +9,7 @@ type Props = {
uri: string,
};
class ModalSendTip extends React.PureComponent<Props> {
class ModalPublishSuccess extends React.PureComponent<Props> {
render() {
const { closeModal, clearPublish, navigate, uri } = this.props;
@ -20,7 +20,7 @@ class ModalSendTip extends React.PureComponent<Props> {
contentLabel={__('File published')}
onConfirmed={() => {
clearPublish();
navigate('/published');
navigate('/$/published');
closeModal();
}}
>
@ -38,4 +38,4 @@ class ModalSendTip extends React.PureComponent<Props> {
}
}
export default ModalSendTip;
export default ModalPublishSuccess;