Fix transitions between components
This commit is contained in:
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user