0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 06:32:39 +00:00

Creating a brand new admin page

This commit is contained in:
Scott Tolksdorf
2017-01-09 20:11:01 -05:00
parent 1aa79b32d9
commit 37de888f03
10 changed files with 159 additions and 46 deletions

View File

@@ -0,0 +1,45 @@
const React = require('react');
const _ = require('lodash');
const cx = require('classnames');
const request = require('superagent');
const BrewLookup = React.createClass({
getDefaultProps: function() {
return {
adminKey : '',
};
},
getInitialState: function() {
return {
query:'',
resultBrew : null
};
},
handleChange : function(e){
this.setState({
query : e.target.value
})
},
lookup : function(){
},
renderFoundBrew : function(){
if(!this.state.resultBrew) return null;
},
render: function(){
return <div className='brewLookup'>
<h1>Brew Lookup</h1>
<input type='text' value={this.state.query} onChange={this.handleChange} placeholder='edit or share id...' />
<button onClick={this.lookup}><i className='fa fa-search'/></button>
{this.renderFoundBrew()}
</div>
}
});
module.exports = BrewLookup;

View File

@@ -0,0 +1,8 @@
.brewLookup{
height : 200px;
input{
height : 33px;
padding : 0px 10px;
}
}