import React, { PropTypes, Component } from 'react'; import { intlShape } from 'react-intl'; import NovaForm from "meteor/nova:forms"; import { withRouter } from 'react-router' import Posts from "meteor/nova:posts"; const PostsNewForm = (props, context) => { return (
{ props.router.push({pathname: Posts.getPageUrl(post)}); props.flash(context.intl.formatMessage({id: "posts.created_message"}), "success"); }} />
); }; PostsNewForm.propTypes = { novaFormMutation: React.PropTypes.func, router: React.PropTypes.object, flash: React.PropTypes.object, } PostsNewForm.contextTypes = { currentUser: React.PropTypes.object, triggerMainRefetch: React.PropTypes.func, intl: intlShape }; PostsNewForm.displayName = "PostsNewForm"; module.exports = PostsNewForm;