summaryrefslogtreecommitdiffstats
path: root/web/react/components/search_results.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-08-14 15:03:32 -0400
committerChristopher Speller <crspeller@gmail.com>2015-08-14 15:03:32 -0400
commit26a8e19a357aee9e1b39623e604ce92bdfaa00df (patch)
tree41a18a9bcbbcc7cd961cc424878ac37aade5c288 /web/react/components/search_results.jsx
parentb9aef9f2a6b90663cb7ba4ff9e42560c145b631d (diff)
downloadchat-26a8e19a357aee9e1b39623e604ce92bdfaa00df.tar.gz
chat-26a8e19a357aee9e1b39623e604ce92bdfaa00df.tar.bz2
chat-26a8e19a357aee9e1b39623e604ce92bdfaa00df.zip
Revert "MM-375 Adds text formatting features using a modified version of the marked js library"
Diffstat (limited to 'web/react/components/search_results.jsx')
-rw-r--r--web/react/components/search_results.jsx12
1 files changed, 2 insertions, 10 deletions
diff --git a/web/react/components/search_results.jsx b/web/react/components/search_results.jsx
index 8f6bd861a..643ad112b 100644
--- a/web/react/components/search_results.jsx
+++ b/web/react/components/search_results.jsx
@@ -84,8 +84,6 @@ var SearchItem = React.createClass({
channelName = (channel.type === 'D') ? "Private Message" : channel.display_name;
}
- var searchItemKey = Date.now().toString();
-
return (
<div className="search-item-container post" onClick={this.handleClick}>
<div className="search-channel__name">{ channelName }</div>
@@ -101,7 +99,7 @@ var SearchItem = React.createClass({
</time>
</li>
</ul>
- <div key={this.props.key + searchItemKey} className="search-item-snippet"><span>{message}</span></div>
+ <div className="search-item-snippet"><span>{message}</span></div>
</div>
</div>
);
@@ -133,7 +131,6 @@ module.exports = React.createClass({
if (this.isMounted()) {
var newState = getStateFromStores();
if (!utils.areStatesEqual(newState, this.state)) {
- newState.last_edit_time = Date.now();
this.setState(newState);
}
}
@@ -155,11 +152,6 @@ module.exports = React.createClass({
var noResults = (!results || !results.order || !results.order.length);
var searchTerm = PostStore.getSearchTerm();
- var searchItemKey = "";
- if (this.state.last_edit_time) {
- searchItemKey += this.state.last_edit_time.toString();
- }
-
return (
<div className="sidebar--right__content">
<div className="search-bar__container sidebar--right__search-header">{searchForm}</div>
@@ -170,7 +162,7 @@ module.exports = React.createClass({
{ noResults ? <div className="sidebar--right__subheader">No results</div>
: results.order.map(function(id) {
var post = results.posts[id];
- return <SearchItem key={searchItemKey + post.id} post={post} term={searchTerm} isMentionSearch={this.props.isMentionSearch} />
+ return <SearchItem key={post.id} post={post} term={searchTerm} isMentionSearch={this.props.isMentionSearch} />
}, this)
}