Fix transitions between components
This commit is contained in:
@ -25,9 +25,9 @@ if(container) {
|
|||||||
<Route path="/" component={ App }>
|
<Route path="/" component={ App }>
|
||||||
<IndexRoute component={ NewsletterList } />
|
<IndexRoute component={ NewsletterList } />
|
||||||
<Route path="new" component={ NewsletterTypes } />
|
<Route path="new" component={ NewsletterTypes } />
|
||||||
<Route name="standard" path="new/standard" handler={ NewsletterStandard } />
|
<Route name="standard" path="new/standard" component={ NewsletterStandard } />
|
||||||
<Route name="welcome" path="new/welcome" handler={ NewsletterWelcome } />
|
<Route name="welcome" path="new/welcome" component={ NewsletterWelcome } />
|
||||||
<Route name="template" path="template/:id" handler={ NewsletterTemplates } />
|
<Route name="template" path="template/:id" component={ NewsletterTemplates } />
|
||||||
<Route path="send/:id" component={ NewsletterSend } />
|
<Route path="send/:id" component={ NewsletterSend } />
|
||||||
<Route path="*" component={ NewsletterList } />
|
<Route path="*" component={ NewsletterList } />
|
||||||
</Route>
|
</Route>
|
||||||
|
@ -18,10 +18,10 @@ define(
|
|||||||
|
|
||||||
var NewsletterStandard = React.createClass({
|
var NewsletterStandard = React.createClass({
|
||||||
mixins: [
|
mixins: [
|
||||||
Router.Navigation
|
Router.History
|
||||||
],
|
],
|
||||||
showTemplateSelection: function(newsletterId) {
|
showTemplateSelection: function(newsletterId) {
|
||||||
this.transitionTo('/template/' + newsletterId);
|
this.history.pushState(null, `/template/${newsletterId}`);
|
||||||
},
|
},
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
// No options for this type, create a newsletter upon mounting
|
// No options for this type, create a newsletter upon mounting
|
||||||
|
@ -66,7 +66,7 @@ define(
|
|||||||
|
|
||||||
var NewsletterWelcome = React.createClass({
|
var NewsletterWelcome = React.createClass({
|
||||||
mixins: [
|
mixins: [
|
||||||
Router.Navigation
|
Router.History
|
||||||
],
|
],
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
@ -121,7 +121,7 @@ define(
|
|||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
showTemplateSelection: function(newsletterId) {
|
showTemplateSelection: function(newsletterId) {
|
||||||
this.transitionTo('/template/' + newsletterId);
|
this.history.pushState(null, `/template/${newsletterId}`);
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
var roleListSelection, timeNumber;
|
var roleListSelection, timeNumber;
|
||||||
|
Reference in New Issue
Block a user