From 3beee9df2c297fffb3a03cd1da6e2c380ef6d4c7 Mon Sep 17 00:00:00 2001 From: Eric Barbour Date: Jul 14 2016 14:40:39 +0000 Subject: Make feed limit configurable --- diff --git a/hubs/static/client/app/components/Feed.jsx b/hubs/static/client/app/components/Feed.jsx index 1f208aa..7d9c618 100644 --- a/hubs/static/client/app/components/Feed.jsx +++ b/hubs/static/client/app/components/Feed.jsx @@ -3,14 +3,12 @@ import { render } from 'react-dom'; import Panel from './Panel.jsx'; -const FEED_MESSAGE_LIMIT = 20; - export default class Feed extends React.Component { constructor(props) { super(props); this.state = { matches: this.props.matches, - messageLimit: FEED_MESSAGE_LIMIT, + messageLimit: this.props.messageLimit, sse: true, }; this.source = (!!window.EventSource) ? new EventSource(this.props.url) : {}; @@ -30,17 +28,12 @@ export default class Feed extends React.Component { }; } render() { - const feedNodes = this.state.matches.map(match => { - return ; + const feedNodes = this.state.matches.map((match, idx) => { + return ; }); return ( -
-
- Live Feed -
-
- {feedNodes} -
+
+ {feedNodes}
); } diff --git a/hubs/static/client/app/components/Markup.jsx b/hubs/static/client/app/components/Markup.jsx index 768a81b..5023498 100644 --- a/hubs/static/client/app/components/Markup.jsx +++ b/hubs/static/client/app/components/Markup.jsx @@ -5,7 +5,6 @@ export default class Markup extends React.Component { return { __html: this.props.match.markup }; } render() { - debugger; return (