Removing logs & creating

This commit is contained in:
Jeffrey Morgan
2015-02-16 15:04:00 -08:00
parent 0c3f71b75c
commit da27dd07a2
2 changed files with 3 additions and 20 deletions

View File

@@ -202,13 +202,10 @@ var ContainerStore = assign(Object.create(EventEmitter.prototype), {
callback();
}
var placeholderData = JSON.parse(localStorage.getItem('store.placeholders'));
console.log(placeholderData);
console.log(_.keys(_containers));
if (placeholderData) {
_placeholders = _.omit(placeholderData, _.keys(_containers));
localStorage.setItem('store.placeholders', JSON.stringify(_placeholders));
}
console.log(_placeholders);
this.emit(this.CLIENT_CONTAINER_EVENT);
this._resumePulling();
this._startListeningToEvents();
@@ -262,8 +259,6 @@ var ContainerStore = assign(Object.create(EventEmitter.prototype), {
Downloading: true
}
};
console.log(_placeholders);
console.log(JSON.stringify(_placeholders));
localStorage.setItem('store.placeholders', JSON.stringify(_placeholders));
self.emit(self.CLIENT_CONTAINER_EVENT, containerName, 'create');

View File

@@ -17,14 +17,10 @@ var NewContainer = React.createClass({
results: _recommended,
loading: false,
tags: {},
active: null,
creating: []
active: null
};
},
componentDidMount: function () {
this.setState({
creating: []
});
this.refs.searchInput.getDOMNode().focus();
if (!_recommended.length) {
this.recommended();
@@ -137,10 +133,7 @@ var NewContainer = React.createClass({
render: function () {
var self = this;
var title = this.state.query ? 'Results' : 'Recommended';
var data = [];
if (this.state.results) {
data = this.state.results.slice(0, 6);
}
var data = this.state.results;
var results;
if (data.length) {
var items = data.map(function (r) {
@@ -165,12 +158,7 @@ var NewContainer = React.createClass({
} else {
imgsrc = 'http://kitematic.com/recommended/kitematic_html.png';
}
var action;
if (_.find(self.state.creating, r.name)) {
action = <RetinaImage src="loading.png"/>;
} else {
action = <a className="btn btn-action" onClick={self.handleClick.bind(self, r.name)}>Create</a>;
}
var action = <a className="btn btn-action" onClick={self.handleClick.bind(self, r.name)}>Create</a>;
return (
<div key={r.name} className="image-item">
<div className="logo" style={logoStyle}>