diff --git a/client/admin/admin.jsx b/client/admin/admin.jsx index 92e0b2aee..c20b6abed 100644 --- a/client/admin/admin.jsx +++ b/client/admin/admin.jsx @@ -8,11 +8,38 @@ const BrewLookup = require('./brewLookup/brewLookup.jsx'); const BrewCompress = require ('./brewCompress/brewCompress.jsx'); const Stats = require('./stats/stats.jsx'); +const tabGroups = ['brews']; + const Admin = createClass({ getDefaultProps : function() { return {}; }, + getInitialState : function() { + return { + currentTab : 'brews' + }; + }, + + handleClick : function(newTab) { + if(this.state.currentTab === newTab) return; + this.setState({ + currentTab : newTab + }); + }, + + renderBrewTools : function(){ + return <> + +
+ +
+ +
+ + ; + }, + render : function(){ return
@@ -23,13 +50,12 @@ const Admin = createClass({
- -
- -
- -
- +
+ {tabGroups.map((name, idx)=>{ + return ; + })} +
+ {this.state.currentTab == 'brews' && this.renderBrewTools()}
; }