Removed some unused code, and cleaned up some ternary operations.
This commit is contained in:
@@ -23,7 +23,6 @@ class Chat extends Component
|
||||
const {
|
||||
roomClient,
|
||||
senderPlaceHolder,
|
||||
disabledInput,
|
||||
autofocus,
|
||||
displayName,
|
||||
picture
|
||||
@@ -53,7 +52,6 @@ class Chat extends Component
|
||||
className='new-message'
|
||||
name='message'
|
||||
placeholder={senderPlaceHolder}
|
||||
disabled={disabledInput}
|
||||
autoFocus={autofocus}
|
||||
autoComplete='off'
|
||||
/>
|
||||
@@ -72,7 +70,6 @@ Chat.propTypes =
|
||||
{
|
||||
roomClient : PropTypes.any.isRequired,
|
||||
senderPlaceHolder : PropTypes.string,
|
||||
disabledInput : PropTypes.bool,
|
||||
autofocus : PropTypes.bool,
|
||||
displayName : PropTypes.string,
|
||||
picture : PropTypes.string
|
||||
@@ -88,9 +85,8 @@ Chat.defaultProps =
|
||||
const mapStateToProps = (state) =>
|
||||
{
|
||||
return {
|
||||
disabledInput : state.chatbehavior.disabledInput,
|
||||
displayName : state.me.displayName,
|
||||
picture : state.me.picture
|
||||
displayName : state.me.displayName,
|
||||
picture : state.me.picture
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ const ListMe = ({ me }) =>
|
||||
</div>
|
||||
|
||||
<div className='indicators'>
|
||||
{me.raisedHand && (
|
||||
<If condition={me.raisedHand}>
|
||||
<div className='icon raise-hand on' />
|
||||
)}
|
||||
</If>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -13,9 +13,9 @@ const TabHeader = ({ currentToolTab, setToolTab, id, name, badge }) => (
|
||||
>
|
||||
{name}
|
||||
|
||||
{badge > 0 && (
|
||||
<If condition={badge > 0}>
|
||||
<span className='badge'>{badge}</span>
|
||||
)}
|
||||
</If>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
@@ -59,11 +59,11 @@ class ToolArea extends React.Component
|
||||
/>
|
||||
<p>Toolbox</p>
|
||||
</span>
|
||||
{!toolAreaOpen && unread > 0 && (
|
||||
<If condition={!toolAreaOpen && unread > 0}>
|
||||
<span className={classNames('badge', { long: unread >= 10 })}>
|
||||
{unread}
|
||||
</span>
|
||||
)}
|
||||
</If>
|
||||
</div>
|
||||
<div className='tab-headers'>
|
||||
<TabHeader
|
||||
|
||||
Reference in New Issue
Block a user