const Post = ({ url, parseTitle, parseImage, parseText , parseViews }) => { return ( <Item> <Item.Image src={parseImage} /> <Item.Content> <Item.Header as='a' href={url} target='_blank'>{parseTitle}</Item.Header> <Item.Description>{setText(parseText)}</Item.Description> <Item.Extra> <Label icon='eye' content={parseViews} /> </Item.Extra> </Item.Content> </Item> ) }
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 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 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 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 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 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 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 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 postTaggedNotification({ _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" }}> tagged 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 postTaggedNotification({ _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" }}> tagged 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 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> ); }