Fix transitions between components

This commit is contained in:
Tautvidas Sipavičius
2015-10-22 13:18:40 +03:00
parent e13df4d794
commit 22949b77ce
3 changed files with 7 additions and 7 deletions

View File

@ -25,9 +25,9 @@ if(container) {
<Route path="/" component={ App }>
<IndexRoute component={ NewsletterList } />
<Route path="new" component={ NewsletterTypes } />
<Route name="standard" path="new/standard" handler={ NewsletterStandard } />
<Route name="welcome" path="new/welcome" handler={ NewsletterWelcome } />
<Route name="template" path="template/:id" handler={ NewsletterTemplates } />
<Route name="standard" path="new/standard" component={ NewsletterStandard } />
<Route name="welcome" path="new/welcome" component={ NewsletterWelcome } />
<Route name="template" path="template/:id" component={ NewsletterTemplates } />
<Route path="send/:id" component={ NewsletterSend } />
<Route path="*" component={ NewsletterList } />
</Route>

View File

@ -18,10 +18,10 @@ define(
var NewsletterStandard = React.createClass({
mixins: [
Router.Navigation
Router.History
],
showTemplateSelection: function(newsletterId) {
this.transitionTo('/template/' + newsletterId);
this.history.pushState(null, `/template/${newsletterId}`);
},
componentDidMount: function() {
// No options for this type, create a newsletter upon mounting

View File

@ -66,7 +66,7 @@ define(
var NewsletterWelcome = React.createClass({
mixins: [
Router.Navigation
Router.History
],
getInitialState: function() {
return {
@ -121,7 +121,7 @@ define(
}.bind(this));
},
showTemplateSelection: function(newsletterId) {
this.transitionTo('/template/' + newsletterId);
this.history.pushState(null, `/template/${newsletterId}`);
},
render: function() {
var roleListSelection, timeNumber;