Skip to content

Commit

Permalink
Cleanup old following edit link method, and rename expandable sidebar…
Browse files Browse the repository at this point in the history
… component to avoid conflict with new SidebarMenu in layout
  • Loading branch information
bluefuton committed Jan 14, 2016
1 parent 762de70 commit de2b33b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
4 changes: 2 additions & 2 deletions client/reader/sidebar/menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Gridicon from 'components/gridicon';
import Button from 'components/button';
import Count from 'components/count';

const SidebarMenu = React.createClass( {
const ExpandableSidebarMenu = React.createClass( {

propTypes: {
title: React.PropTypes.oneOfType( [ React.PropTypes.string, React.PropTypes.element ] ).isRequired,
Expand Down Expand Up @@ -125,4 +125,4 @@ const SidebarMenu = React.createClass( {
}
} );

export default SidebarMenu;
export default ExpandableSidebarMenu;
21 changes: 1 addition & 20 deletions client/reader/sidebar/sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const assign = require( 'lodash/object/assign' ),
map = require( 'lodash/collection/map' ),
some = require( 'lodash/collection/some' ),
startsWith = require( 'lodash/string/startsWith' ),
ReactDom = require( 'react-dom' ),
React = require( 'react' ),
page = require( 'page' ),
url = require( 'url' ),
Expand Down Expand Up @@ -262,25 +261,7 @@ module.exports = React.createClass( {
}, this );
},

getFollowingEditLink: function() {
var followingEditUrl = '/following/edit',
followingEditRel;

// If Calypso following/edit isn't yet enabled, use the Atlas version
if ( ! config.isEnabled( 'reader/following-edit' ) ) {
followingEditUrl = 'https://wordpress.com'.concat( followingEditUrl );
followingEditRel = 'external';
}

return {
url: followingEditUrl,
rel: followingEditRel
};
},

render: function() {
let followingEditLink = this.getFollowingEditLink();

const tagCount = this.state.tags ? this.state.tags.length : 0,
listCount = this.state.lists ? this.state.lists.length : 0;

Expand Down Expand Up @@ -355,7 +336,7 @@ module.exports = React.createClass( {
{ this.renderTags() }

</ExpandableSidebarMenu>
</ul>
</Sidebar>
);
}
} );

0 comments on commit de2b33b

Please sign in to comment.