Skip to content

Commit

Permalink
Themes: source prop for thanks modal
Browse files Browse the repository at this point in the history
  • Loading branch information
seear committed May 9, 2016
1 parent e9e231b commit f6d976e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion client/my-sites/theme/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const ThemeSheet = React.createClass( {
<ActivatingTheme siteId={ siteID }>
<ThanksModal
site={ this.props.selectedSite }
topLink={ 'customize' }
source={ 'details' }
clearActivated={ bindActionCreators( clearActivated, this.props.dispatch ) }/>
</ActivatingTheme>
<div className="themes__sheet-columns">
Expand Down
1 change: 1 addition & 0 deletions client/my-sites/themes/single-site.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ var ThemesSingleSite = React.createClass( {
<ActivatingTheme siteId={ site.ID } >
<ThanksModal
site={ site }
source={ 'list' }
clearActivated={ bindActionCreators( Action.clearActivated, this.props.dispatch ) } />
</ActivatingTheme>
<CurrentThemeData site={ site }>
Expand Down
12 changes: 3 additions & 9 deletions client/my-sites/themes/thanks-modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@ var ThanksModal = React.createClass( {

propTypes: {
clearActivated: React.PropTypes.func.isRequired,
// First link to show for wpcom themes
topLink: React.PropTypes.oneOf( [ 'features', 'customize' ] ),
},

getDefaultProps: function() {
return {
topLink: 'features',
};
// Where is the modal being used?
source: React.PropTypes.oneOf( [ 'details', 'list' ] ).isRequired,
},

onCloseModal: function() {
Expand Down Expand Up @@ -54,7 +48,7 @@ var ThanksModal = React.createClass( {
return (
<ul>
<li>
{ this.props.topLink === 'features' ? features : customize }
{ this.props.source === 'list' ? features : customize }
</li>
<li>
{ this.translate( 'Have questions? Stop by our {{a}}support forums.{{/a}}', {
Expand Down

0 comments on commit f6d976e

Please sign in to comment.