From 39550d805a30767dac47c3c187d5350f01fc95be Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Fri, 23 Oct 2015 17:41:50 -0400 Subject: [PATCH] Fix #152: Don't output activity without a message --- src/components/activity/activity.jsx | 29 ++++++++++++++-------------- src/views/components/components.jsx | 3 +++ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/components/activity/activity.jsx b/src/components/activity/activity.jsx index d2a2dfb45..452ecfc30 100644 --- a/src/components/activity/activity.jsx +++ b/src/components/activity/activity.jsx @@ -38,20 +38,21 @@ var Activity = React.createClass({ var actionDate = new Date(item.datetime_created + 'Z'); var activityMessageHTML = '' + item.actor.username + '' + item.message; - - return ( -
  • - - -

    -

    - - - -

    -
    -
  • - ); + if (item.message.replace(/\s/g, '')) { + return ( +
  • + + +

    +

    + + + +

    +
    +
  • + ); + } })} diff --git a/src/views/components/components.jsx b/src/views/components/components.jsx index 998905f8d..49c6e908a 100644 --- a/src/views/components/components.jsx +++ b/src/views/components/components.jsx @@ -1,6 +1,7 @@ var React = require('react'); var render = require('../../lib/render.jsx'); +var Activity = require('../../components/activity/activity.jsx'); var Box = require('../../components/box/box.jsx'); var Button = require('../../components/forms/button.jsx'); var Carousel = require('../../components/carousel/carousel.jsx'); @@ -32,6 +33,8 @@ var Components = React.createClass({ title="Carousel component in a box!"> +

    {'What\'s Happening??'}

    + ); }