Cosmetic reformatting of multiple jsx files

Этот коммит содержится в:
Reed Garmsen
2015-08-31 09:35:31 -07:00
родитель 5b81125e4d
Коммит e2a24f40b7
24 изменённых файлов: 1326 добавлений и 699 удалений

Просмотреть файл

@@ -23,27 +23,30 @@ function getCountsStateFromStores() {
return {count: count};
}
module.exports = React.createClass({
displayName: 'NotifyCounts',
componentDidMount: function() {
export default class NotifyCounts extends React.Component {
constructor(props) {
super(props);
this.onListenerChange = this.onListenerChange.bind(this);
this.state = getCountsStateFromStores();
}
componentDidMount() {
ChannelStore.addChangeListener(this.onListenerChange);
},
componentWillUnmount: function() {
}
componentWillUnmount() {
ChannelStore.removeChangeListener(this.onListenerChange);
},
onListenerChange: function() {
}
onListenerChange() {
var newState = getCountsStateFromStores();
if (!utils.areStatesEqual(newState, this.state)) {
this.setState(newState);
}
},
getInitialState: function() {
return getCountsStateFromStores();
},
render: function() {
}
render() {
if (this.state.count) {
return <span className='badge badge-notify'>{this.state.count}</span>;
}
return null;
}
});
}