function followNotification({ _id, createdAt, sender }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>followed you</span> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> </Feed.Content> </Feed.Event> ); }
render() { const { color } = this.props; const { data, loadingState } = this.state; return ( <> {!loadingState ? <Statistic inverted size='huge' color={color} style={{ height: '100%', marginTop: '5em' }}> <Statistic.Value>{data.value}</Statistic.Value> <Statistic.Label>{data.label}</Statistic.Label> </Statistic> : <Dimmer active> <Loader>Loading</Loader> </Dimmer> } </> ) }
const ExampleStatistics = () => <Grid> <Grid.Column computer={4} mobile={8}> <Segment textAlign='center' color='green'> <Statistic size='small'> <Statistic.Value>5,550</Statistic.Value> <Statistic.Label>Books</Statistic.Label> </Statistic> </Segment> </Grid.Column> <Grid.Column computer={4} mobile={8}> <Segment textAlign='center' color='orange'> <Statistic size='small'> <Statistic.Value>1680</Statistic.Value> <Statistic.Label>Tapes</Statistic.Label> </Statistic> </Segment> </Grid.Column> <Grid.Column computer={4} mobile={8}> <Segment textAlign='center'> <Statistic size='small'> <Statistic.Value>56734</Statistic.Value> <Statistic.Label>Images</Statistic.Label> </Statistic> </Segment> </Grid.Column> </Grid>
function commentTaggedNotification({ _id, createdAt, sender, post }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>mentioned you on</span>{" "} <Link to={`/p/${post[0]._id}`}>post</Link> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> <Feed.Extra images> <Link to={`/p/${post[0]._id}`}> <Image rounded src={`/images/post-images/thumbnail/${post[0].photo}`} /> </Link> </Feed.Extra> </Feed.Content> </Feed.Event> ); }
function commentLikeNotification({ _id, createdAt, sender, comment, post }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>liked your comment</span>{" "} {comment[0].text} <span style={{ fontWeight: "normal" }}>on</span>{" "} <Link to={`/p/${post[0]._id}`}>post</Link> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> <Feed.Extra images> <Link to={`/p/${post[0]._id}`}> <Image rounded src={`/images/post-images/thumbnail/${post[0].photo}`} /> </Link> </Feed.Extra> </Feed.Content> </Feed.Event> ); }
function followNotification({ _id, createdAt, sender }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>followed you</span> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> </Feed.Content> </Feed.Event> ); }
function commentTaggedNotification({ _id, createdAt, sender, post }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>mentioned you on</span>{" "} <Link to={`/p/${post[0]._id}`}>post</Link> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> <Feed.Extra images> <Link to={`/p/${post[0]._id}`}> <Image rounded src={`/images/post-images/thumbnail/${post[0].photo}`} /> </Link> </Feed.Extra> </Feed.Content> </Feed.Event> ); }
function postLikeNotification({ _id, createdAt, sender, post }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>liked your</span>{" "} <Link to={`/p/${post[0]._id}`}>post</Link> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> <Feed.Extra images> <Link to={`/p/${post[0]._id}`}> <Image rounded src={`/images/post-images/thumbnail/${post[0].photo}`} /> </Link> </Feed.Extra> </Feed.Content> </Feed.Event> ); }
function postLikeNotification({ _id, createdAt, sender, post }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>liked your</span>{" "} <Link to={`/p/${post[0]._id}`}>post</Link> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> <Feed.Extra images> <Link to={`/p/${post[0]._id}`}> <Image rounded src={`/images/post-images/thumbnail/${post[0].photo}`} /> </Link> </Feed.Extra> </Feed.Content> </Feed.Event> ); }
function addCommentNotification({ _id, createdAt, sender, comment, post }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>commented</span>{" "} {comment[0].text} <span style={{ fontWeight: "normal" }}>on</span>{" "} <Link to={`/p/${post[0]._id}`}>post</Link> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> <Feed.Extra images> <Link to={`/p/${post[0]._id}`}> <Image rounded src={`/images/post-images/thumbnail/${post[0].photo}`} /> </Link> </Feed.Extra> </Feed.Content> </Feed.Event> ); }
function likeCommentReplyNotification({ _id, createdAt, sender, reply, post }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>liked your reply</span>{" "} {reply[0].text} <span style={{ fontWeight: "normal" }}>on</span>{" "} <Link to={`/p/${post[0]._id}`}>post</Link> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> <Feed.Extra images> <Link to={`/p/${post[0]._id}`}> <Image rounded src={`/images/post-images/thumbnail/${post[0].photo}`} /> </Link> </Feed.Extra> </Feed.Content> </Feed.Event> ); }
function addCommentNotification({ _id, createdAt, sender, comment, post }) { return ( <Feed.Event key={_id}> <Feed.Label image={`/images/profile-picture/100x100/${sender[0].profilePicture}`} /> <Feed.Content> <Feed.Summary> <Feed.User as={Link} to={"/" + sender[0].username}> {sender[0].username} </Feed.User>{" "} <span style={{ fontWeight: "normal" }}>commented</span>{" "} {comment[0].text} <span style={{ fontWeight: "normal" }}>on</span>{" "} <Link to={`/p/${post[0]._id}`}>post</Link> <Feed.Date>{dayjs(createdAt).fromNow()}</Feed.Date> </Feed.Summary> <Feed.Extra images> <Link to={`/p/${post[0]._id}`}> <Image rounded src={`/images/post-images/thumbnail/${post[0].photo}`} /> </Link> </Feed.Extra> </Feed.Content> </Feed.Event> ); }