summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_list.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-10-05 09:58:42 -0400
committerChristopher Speller <crspeller@gmail.com>2015-10-05 11:05:06 -0400
commit33b957ed1a8a44d4bed0f9c674d5602bad5028ea (patch)
treeeecee1a84d2da761345c244fa8078488a52eba94 /web/react/components/post_list.jsx
parent515d709c2ef13b6ed7a3d04a7ad2fb2acbb0ec5d (diff)
downloadchat-33b957ed1a8a44d4bed0f9c674d5602bad5028ea.tar.gz
chat-33b957ed1a8a44d4bed0f9c674d5602bad5028ea.tar.bz2
chat-33b957ed1a8a44d4bed0f9c674d5602bad5028ea.zip
Disabling complexity warning. Allowing non-nested ternary. Upgrading ESList. Adding new ESLint rules. Fixing new ESLint errors.
Diffstat (limited to 'web/react/components/post_list.jsx')
-rw-r--r--web/react/components/post_list.jsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index a31967257..a534e5789 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -37,9 +37,11 @@ export default class PostList extends React.Component {
this.deactivate = this.deactivate.bind(this);
this.resize = this.resize.bind(this);
- this.state = this.getStateFromStores(props.channelId);
- this.state.numToDisplay = Constants.POST_CHUNK_SIZE;
- this.state.isFirstLoadComplete = false;
+ const state = this.getStateFromStores(props.channelId);
+ state.numToDisplay = Constants.POST_CHUNK_SIZE;
+ state.isFirstLoadComplete = false;
+
+ this.state = state;
}
getStateFromStores(id) {
var postList = PostStore.getPosts(id);
@@ -449,10 +451,10 @@ export default class PostList extends React.Component {
}
var createMessage;
- if (creatorName !== '') {
- createMessage = (<span>This is the start of the <strong>{uiName}</strong> {uiType}, created by <strong>{creatorName}</strong> on <strong>{utils.displayDate(channel.create_at)}</strong></span>);
- } else {
+ if (creatorName === '') {
createMessage = 'This is the start of the ' + uiName + ' ' + uiType + ', created on ' + utils.displayDate(channel.create_at) + '.';
+ } else {
+ createMessage = (<span>This is the start of the <strong>{uiName}</strong> {uiType}, created by <strong>{creatorName}</strong> on <strong>{utils.displayDate(channel.create_at)}</strong></span>);
}
return (