Retrieving counts and displaying new comments to user.

This commit is contained in:
David Jay
2017-02-21 17:23:09 -05:00
parent 17813e23a9
commit 9149b737f5
10 changed files with 165 additions and 37 deletions
+18
View File
@@ -0,0 +1,18 @@
import React, {PropTypes} from 'react';
const NewCount = ({commentCount, countCache}) =>
<div>
{
countCache && commentCount - countCache > 0 &&
<div>
Load {commentCount - countCache} More Comments
</div>
}
</div>;
NewCount.propTypes = {
commentCount: PropTypes.number.isRequired,
countCache: PropTypes.number
};
export default NewCount;