summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-08-11 12:05:20 -0400
committerChristopher Speller <crspeller@gmail.com>2015-08-11 12:05:20 -0400
commitbffc37be134cca4b6b8b2172726de39595b6091a (patch)
treeb44c36f39613fdc75ca5e8a00f68670294e5720e /web/react/components
parent6a333f201811b20eda8c0756cd6e27aa8c1b0288 (diff)
parent8297f99209d7947e8cb806e5df918b45d0e06476 (diff)
downloadchat-bffc37be134cca4b6b8b2172726de39595b6091a.tar.gz
chat-bffc37be134cca4b6b8b2172726de39595b6091a.tar.bz2
chat-bffc37be134cca4b6b8b2172726de39595b6091a.zip
Merge pull request #350 from nickago/MM-1684
MM-1684 Refactored code to remove errors on startup
Diffstat (limited to 'web/react/components')
-rw-r--r--web/react/components/post_list.jsx4
-rw-r--r--web/react/components/settings_sidebar.jsx3
-rw-r--r--web/react/components/sidebar_header.jsx2
3 files changed, 5 insertions, 4 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index bb1b1704c..83f806b79 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -439,7 +439,7 @@ module.exports = React.createClass({
currentPostDay = utils.getDateForUnixTicks(post.create_at);
if (currentPostDay.toDateString() != previousPostDay.toDateString()) {
postCtls.push(
- <div className="date-separator">
+ <div key={currentPostDay.toDateString()} className="date-separator">
<hr className="separator__hr" />
<div className="separator__text">{currentPostDay.toDateString()}</div>
</div>
@@ -449,7 +449,7 @@ module.exports = React.createClass({
if (post.create_at > last_viewed && !rendered_last_viewed) {
rendered_last_viewed = true;
postCtls.push(
- <div className="new-separator">
+ <div key="unviewed" className="new-separator">
<hr id="new_message" className="separator__hr" />
<div className="separator__text">New Messages</div>
</div>
diff --git a/web/react/components/settings_sidebar.jsx b/web/react/components/settings_sidebar.jsx
index ae8510cf2..b4d291622 100644
--- a/web/react/components/settings_sidebar.jsx
+++ b/web/react/components/settings_sidebar.jsx
@@ -4,6 +4,7 @@
var utils = require('../utils/utils.jsx');
module.exports = React.createClass({
+ displayName:'SettingsSidebar',
updateTab: function(tab) {
this.props.updateTab(tab);
$('.settings-modal').addClass('display--content');
@@ -14,7 +15,7 @@ module.exports = React.createClass({
<div className="">
<ul className="nav nav-pills nav-stacked">
{this.props.tabs.map(function(tab) {
- return <li className={self.props.activeTab == tab.name ? 'active' : ''}><a href="#" onClick={function(){self.updateTab(tab.name);}}><i className={tab.icon}></i>{tab.ui_name}</a></li>
+ return <li key={tab.name+'_li'} className={self.props.activeTab == tab.name ? 'active' : ''}><a key={tab.name + '_a'} href="#" onClick={function(){self.updateTab(tab.name);}}><i key={tab.name+'_i'} className={tab.icon}></i>{tab.ui_name}</a></li>
})}
</ul>
</div>
diff --git a/web/react/components/sidebar_header.jsx b/web/react/components/sidebar_header.jsx
index 72b8547e5..cc3f255ee 100644
--- a/web/react/components/sidebar_header.jsx
+++ b/web/react/components/sidebar_header.jsx
@@ -87,7 +87,7 @@ var NavbarDropdown = React.createClass({
}
});
}
- teams.push(<li><a href={utils.getWindowLocationOrigin() + '/signup_team'}>Create a New Team</a></li>);
+ teams.push(<li key='newTeam_li'><a key='newTeam_a' href={utils.getWindowLocationOrigin() + '/signup_team' }>Create a New Team</a></li>);
return (
<ul className='nav navbar-nav navbar-right'>