From f04ef913d9f38d294edbcf89f253fa2d016ffbed Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Fri, 5 Jan 2024 11:39:49 +0100 Subject: [PATCH] feat(reply): add pinned replies ('stickied comment') --- src/components/reply/reply.module.css | 4 ++++ src/components/reply/reply.tsx | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/reply/reply.module.css b/src/components/reply/reply.module.css index 9f1a59ac..301dd817 100644 --- a/src/components/reply/reply.module.css +++ b/src/components/reply/reply.module.css @@ -233,4 +233,8 @@ .addMargin { margin-left: 29px; +} + +.pinned { + color: var(--green); } \ No newline at end of file diff --git a/src/components/reply/reply.tsx b/src/components/reply/reply.tsx index 9a81ff70..76e47867 100644 --- a/src/components/reply/reply.tsx +++ b/src/components/reply/reply.tsx @@ -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 ? '+' : '–'}] - {scoreString} {getFormattedTimeAgo(timestamp)} + {scoreString} {getFormattedTimeAgo(timestamp)}{' '} + {pinned && - stickied comment} {collapsed && ({childrenString})} {stateLabel} {!collapsed && flair && (