Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Route component={AppHeader} />
- {["/articles/:id/edit", "/articles/new"].map((path, index) =>
- <Route key={index} exact path={path} component{ArticleForm}/>
- )}
- <Route exact path="/articles/:id" component={Article}/>
- {["/", "/articles"].map((path, index) =>
- <Route key={index} exact path={path} component{ArticlesList}/>
- )}
- export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Component))
- deleteArticle = async () => {
- await ajaxHelpers.ajaxCall('DELETE',`/articles/${this.state.currentArticleID}`, {}, this.state.token)
- this.props.history.push("/")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement