mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +08:00
Retrieving counts and displaying new comments to user.
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user