diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 596d4ea30..664c266ee 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -25,7 +25,6 @@ class Explore extends React.Component { bindAll(this, [ 'getExploreState', 'handleGetExploreMore', - 'changeItemType', 'handleChangeSortMode', 'getBubble', 'getTab' @@ -95,16 +94,7 @@ class Explore extends React.Component { } }); } - changeItemType () { - let newType; - for (const t of this.state.acceptableTypes) { - if (this.state.itemType !== t) { - newType = t; - break; - } - } - window.location = `${window.location.origin}/explore/${newType}/${this.state.tab}/${this.state.mode}`; - } + handleChangeSortMode (name, value) { if (this.state.acceptableModes.indexOf(value) !== -1) { window.location = @@ -117,76 +107,13 @@ class Explore extends React.Component { }); return ( - {classes === 'active' ? [ -
  • - -
  • - ] : [ -
  • - -
  • - ] - } -
    - ); - } - getTab (type) { - const classes = classNames({ - active: (this.state.itemType === type) - }); - return ( - // **** ADD A CONDITIONAL HERE **** -
  • - {this.state.itemType === type ? [ - type === 'projects' ? [ - - ] : [ - - ] - ] : [ - type === 'projects' ? [ - - ] : [ - - ] - ]} - +
  • -
    ); } + render () { return (
    @@ -198,10 +125,47 @@ class Explore extends React.Component {
    - + {/* {this.getTab('projects')} {this.getTab('studios')} - + */} + { + window.location = `${window.location.origin}/explore/projects/${this.state.category}/${this.state.mode}`; + }, + getContent: () =>( +
  • + {this.state.itemType === type ? [ + + ] : [ + + ]} + +
  • + ) + }, + { + name: 'studios', + onTrigger: () => { + window.location = `${window.location.origin}/explore/studios/${this.state.tab}/${this.state.mode}`; + }, + content: 'studios' + } + ]} + activeTabName={ this.state.itemType } + />
    {this.getBubble('all')}