Refactor redirection on campaign creation

This commit is contained in:
Kailash Nadh 2018-11-28 18:37:39 +05:30
parent ccd966a1f4
commit 5662fac440
1 changed files with 5 additions and 2 deletions

View File

@ -229,7 +229,10 @@ class TheFormDef extends React.PureComponent {
message: "Campaign created",
description: `"${values["name"]}" created` })
this.props.route.history.push(cs.Routes.ViewCampaign.replace(":id", resp.data.data.id) + "#content")
this.props.route.history.push({
pathname: cs.Routes.ViewCampaign.replace(":id", resp.data.data.id),
hash: "content-tab"
})
cb(true)
}).catch(e => {
notification["error"]({ placement: cs.MsgPosition, message: "Error", description: e.message })
@ -435,7 +438,7 @@ class Campaign extends React.PureComponent {
}
// Content tab?
if(document.location.hash === "#content") {
if(document.location.hash === "#content-tab") {
this.setCurrentTab("content")
}
}