Commit d6de9ffe authored by Ray Schamp's avatar Ray Schamp

Clean up activity item rendering logic

parent 5865b6d6
...@@ -36,11 +36,13 @@ var Activity = React.createClass({ ...@@ -36,11 +36,13 @@ var Activity = React.createClass({
{this.props.items && this.props.items.length > 0 ? [ {this.props.items && this.props.items.length > 0 ? [
<ul> <ul>
{this.props.items.map(function (item) { {this.props.items.map(function (item) {
if (item.message.replace(/\s/g, '')) {
var actorProfileUrl = '/users/' + item.actor.username + '/'; var actorProfileUrl = '/users/' + item.actor.username + '/';
var actionDate = new Date(item.datetime_created + 'Z'); var actionDate = new Date(item.datetime_created + 'Z');
var activityMessageHTML = '<a href=' + actorProfileUrl + '>' + var activityMessageHTML = (
item.actor.username + '</a>' + item.message; '<a href=' + actorProfileUrl + '>' + item.actor.username + '</a>' +
if (item.message.replace(/\s/g, '')) { item.message
);
return ( return (
<li key={item.pk}> <li key={item.pk}>
<a href={actorProfileUrl}> <a href={actorProfileUrl}>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment