Large update for all components

reorganization, linting, updating file imports, consolidation
warning: there will be errors in this commit
todo: update webpack, add missing styles, scss files, consolidate the rest of components within features/*
This commit is contained in:
mgabdev
2019-08-07 01:02:36 -04:00
parent 5505f60119
commit 280dc51d85
341 changed files with 8876 additions and 8321 deletions

View File

@@ -1,27 +1 @@
import { shortNumberFormat } from '../../utils/numbers';
import './index.scss';
const mapStateToProps = state => ({
count: state.getIn(['notifications', 'unread']),
});
class NotificationCounter extends PureComponent {
static propTypes = {
count: PropTypes.number.isRequired,
};
render() {
const { count } = this.props;
if (count < 1) return null;
return (
<span className='notification-counter'>{shortNumberFormat(count)}</span>
);
}
}
export default connect(mapStateToProps)(NotificationCounter);
export { default } from './notification_counter';

View File

@@ -0,0 +1,26 @@
import { shortNumberFormat } from '../../utils/numbers';
import './notification_counter.scss';
const mapStateToProps = state => ({
count: state.getIn(['notifications', 'unread']),
});
export default @connect(mapStateToProps)
class NotificationCounter extends PureComponent {
static propTypes = {
count: PropTypes.number.isRequired,
};
render() {
const { count } = this.props;
if (count < 1) return null;
return (
<span className='notification-counter'>{shortNumberFormat(count)}</span>
);
}
}