Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

Commit

Permalink
fix (experiments) #2282 hide Edit Top Sites behind newTabPrefs experi…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
rlr committed Mar 22, 2017
1 parent 5de289f commit e693da5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion content-src/components/NewTabPage/NewTabPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ const NewTabPage = React.createClass({
<section>
<TopSites placeholder={!this.props.isReady} page={PAGE_NAME}
sites={props.TopSites.rows} showNewStyle={topSitesExperimentIsOn}
length={showMoreTopSites ? TOP_SITES_SHOWMORE_LENGTH : TOP_SITES_DEFAULT_LENGTH} />
length={showMoreTopSites ? TOP_SITES_SHOWMORE_LENGTH : TOP_SITES_DEFAULT_LENGTH}
allowEdit={newTabPrefsExperimentIsOn} />
</section>
}
{showHighlights &&
Expand Down
8 changes: 5 additions & 3 deletions content-src/components/TopSites/TopSites.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ const TopSites = React.createClass({
return {
length: TOP_SITES_DEFAULT_LENGTH,
// This is for event reporting
page: "NEW_TAB"
page: "NEW_TAB",
allowEdit: true
};
},
onClickFactory(index, site) {
Expand Down Expand Up @@ -157,7 +158,7 @@ const TopSites = React.createClass({
);
})}
</div>
{!this.props.placeholder &&
{!this.props.placeholder && this.props.allowEdit &&
<EditTopSitesIntl {...this.props} />
}
</section>);
Expand All @@ -181,7 +182,8 @@ TopSites.propTypes = {
*/
placeholder: React.PropTypes.bool,

showNewStyle: React.PropTypes.bool
showNewStyle: React.PropTypes.bool,
allowEdit: React.PropTypes.bool
};

const EditTopSites = React.createClass({
Expand Down

0 comments on commit e693da5

Please sign in to comment.