feat(reply): add pinned replies ('stickied comment')

This commit is contained in:
plebeius.eth
2024-01-05 11:39:49 +01:00
parent 4ad46b6c14
commit f04ef913d9
2 changed files with 7 additions and 1 deletions

View File

@@ -233,4 +233,8 @@
.addMargin {
margin-left: 29px;
}
.pinned {
color: var(--green);
}

View File

@@ -202,6 +202,7 @@ const Reply = ({ depth = 0, isSingle, isNotification = false, reply = {} }: Repl
linkHeight,
linkWidth,
markedAsRead,
pinned,
postCid,
removed,
spoiler,
@@ -285,7 +286,8 @@ const Reply = ({ depth = 0, isSingle, isNotification = false, reply = {} }: Repl
[{collapsed ? '+' : ''}]
</span>
<ReplyAuthor address={author?.address} authorRole={authorRole} cid={cid} displayName={author.displayName} shortAuthorAddress={shortAuthorAddress} />
<span className={styles.score}>{scoreString}</span> <span className={styles.time}>{getFormattedTimeAgo(timestamp)}</span>
<span className={styles.score}>{scoreString}</span> <span className={styles.time}>{getFormattedTimeAgo(timestamp)}</span>{' '}
{pinned && <span className={styles.pinned}>- stickied comment</span>}
{collapsed && <span className={styles.children}> ({childrenString})</span>}
{stateLabel}
{!collapsed && flair && (