Lint clean up
This commit is contained in:
@@ -41,14 +41,14 @@ class ChatInput extends React.PureComponent
|
||||
}
|
||||
|
||||
createNewMessage = (text, sender, name, picture) =>
|
||||
({
|
||||
type : 'message',
|
||||
text,
|
||||
time : Date.now(),
|
||||
name,
|
||||
sender,
|
||||
picture
|
||||
});
|
||||
({
|
||||
type : 'message',
|
||||
text,
|
||||
time : Date.now(),
|
||||
name,
|
||||
sender,
|
||||
picture
|
||||
});
|
||||
|
||||
handleChange = (e) =>
|
||||
{
|
||||
@@ -121,10 +121,10 @@ ChatInput.propTypes =
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) =>
|
||||
({
|
||||
displayName : state.me.displayName,
|
||||
picture : state.me.picture
|
||||
});
|
||||
({
|
||||
displayName : state.me.displayName,
|
||||
picture : state.me.picture
|
||||
});
|
||||
|
||||
export default withRoomContext(
|
||||
connect(mapStateToProps)(withStyles(styles)(ChatInput))
|
||||
|
||||
@@ -26,7 +26,7 @@ const styles = (theme) =>
|
||||
},
|
||||
selfMessage :
|
||||
{
|
||||
marginLeft : 'auto',
|
||||
marginLeft : 'auto'
|
||||
},
|
||||
remoteMessage :
|
||||
{
|
||||
@@ -48,7 +48,7 @@ const styles = (theme) =>
|
||||
borderRadius : '50%',
|
||||
height : '2rem',
|
||||
alignSelf : 'center'
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
const Message = (props) =>
|
||||
@@ -88,12 +88,12 @@ const Message = (props) =>
|
||||
|
||||
Message.propTypes =
|
||||
{
|
||||
self : PropTypes.bool,
|
||||
picture : PropTypes.string,
|
||||
text : PropTypes.string,
|
||||
time : PropTypes.string,
|
||||
name : PropTypes.string,
|
||||
classes : PropTypes.object.isRequired
|
||||
self : PropTypes.bool,
|
||||
picture : PropTypes.string,
|
||||
text : PropTypes.string,
|
||||
time : PropTypes.string,
|
||||
name : PropTypes.string,
|
||||
classes : PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
export default withStyles(styles)(Message);
|
||||
@@ -35,6 +35,7 @@ class MessageList extends React.PureComponent
|
||||
{
|
||||
if (nextProps.chatmessages.length !== this.props.chatmessages.length)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -55,6 +56,7 @@ class MessageList extends React.PureComponent
|
||||
{
|
||||
const {
|
||||
chatmessages,
|
||||
myPicture,
|
||||
classes
|
||||
} = this.props;
|
||||
|
||||
@@ -66,7 +68,7 @@ class MessageList extends React.PureComponent
|
||||
const messageTime = new Date(message.time);
|
||||
|
||||
const picture = (message.sender === 'response' ?
|
||||
message.picture : this.props.myPicture) || EmptyAvatar;
|
||||
message.picture : myPicture) || EmptyAvatar;
|
||||
|
||||
return (
|
||||
<Message
|
||||
@@ -88,12 +90,14 @@ class MessageList extends React.PureComponent
|
||||
MessageList.propTypes =
|
||||
{
|
||||
chatmessages : PropTypes.array,
|
||||
myPicture : PropTypes.string,
|
||||
classes : PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) =>
|
||||
({
|
||||
chatmessages : state.chatmessages
|
||||
});
|
||||
({
|
||||
chatmessages : state.chatmessages,
|
||||
myPicture : state.me.picture
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, null)(withStyles(styles)(MessageList));
|
||||
@@ -12,11 +12,11 @@ const styles = (theme) =>
|
||||
({
|
||||
root :
|
||||
{
|
||||
display : 'flex',
|
||||
alignItems : 'center',
|
||||
width : '100%',
|
||||
padding : theme.spacing.unit,
|
||||
boxShadow : '0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)',
|
||||
display : 'flex',
|
||||
alignItems : 'center',
|
||||
width : '100%',
|
||||
padding : theme.spacing.unit,
|
||||
boxShadow : '0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)',
|
||||
'&:not(:last-child)' :
|
||||
{
|
||||
marginBottom : theme.spacing.unit
|
||||
|
||||
@@ -57,16 +57,14 @@ class MeetingDrawer extends React.PureComponent
|
||||
variant='fullWidth'
|
||||
>
|
||||
<Tab
|
||||
label=
|
||||
{
|
||||
label={
|
||||
<Badge color='secondary' badgeContent={unreadMessages}>
|
||||
Chat
|
||||
</Badge>
|
||||
}
|
||||
/>
|
||||
<Tab
|
||||
label=
|
||||
{
|
||||
label={
|
||||
<Badge color='secondary' badgeContent={unreadFiles}>
|
||||
File sharing
|
||||
</Badge>
|
||||
@@ -99,7 +97,7 @@ const mapStateToProps = (state) => ({
|
||||
});
|
||||
|
||||
const mapDispatchToProps = {
|
||||
setToolTab : stateActions.setToolTab
|
||||
setToolTab : stateActions.setToolTab
|
||||
};
|
||||
|
||||
export default connect(
|
||||
|
||||
@@ -11,11 +11,11 @@ const styles = () =>
|
||||
({
|
||||
root :
|
||||
{
|
||||
padding : '0.5rem',
|
||||
width : '100%',
|
||||
overflow : 'hidden',
|
||||
cursor : 'auto',
|
||||
display : 'flex'
|
||||
padding : '0.5rem',
|
||||
width : '100%',
|
||||
overflow : 'hidden',
|
||||
cursor : 'auto',
|
||||
display : 'flex'
|
||||
},
|
||||
listPeer :
|
||||
{
|
||||
@@ -68,7 +68,7 @@ const styles = () =>
|
||||
backgroundImage : `url(${HandIcon})`,
|
||||
opacity : 1
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
const ListMe = (props) =>
|
||||
|
||||
@@ -16,11 +16,11 @@ const styles = () =>
|
||||
({
|
||||
root :
|
||||
{
|
||||
padding : '0.5rem',
|
||||
width : '100%',
|
||||
overflow : 'hidden',
|
||||
cursor : 'auto',
|
||||
display : 'flex'
|
||||
padding : '0.5rem',
|
||||
width : '100%',
|
||||
overflow : 'hidden',
|
||||
cursor : 'auto',
|
||||
display : 'flex'
|
||||
},
|
||||
listPeer :
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ const styles = (theme) =>
|
||||
cursor : 'pointer',
|
||||
'&.selected' :
|
||||
{
|
||||
backgroundColor: 'rgba(55, 126, 255, 1)'
|
||||
backgroundColor : 'rgba(55, 126, 255, 1)'
|
||||
},
|
||||
'&:not(:last-child)' :
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user