fix(reply): only show state string if state is pending

This commit is contained in:
plebeius.eth
2023-12-16 17:25:20 +01:00
parent 15e8e8b4aa
commit 71c239fa1d

View File

@@ -129,7 +129,7 @@ interface ReplyProps {
}
const Reply = ({ depth = 0, isSingle, isNotification = false, reply = {} }: ReplyProps) => {
const { author, cid, content, downvoteCount, flair, link, linkHeight, linkWidth, markedAsRead, removed, spoiler, subplebbitAddress, timestamp, upvoteCount } =
const { author, cid, content, downvoteCount, flair, link, linkHeight, linkWidth, markedAsRead, removed, spoiler, state, subplebbitAddress, timestamp, upvoteCount } =
reply || {};
const subplebbit = useSubplebbit({ subplebbitAddress });
@@ -197,7 +197,7 @@ const Reply = ({ depth = 0, isSingle, isNotification = false, reply = {} }: Repl
<Flair flair={flair} />
</>
)}
{loadingString}
{state === 'pending' && loadingString}
</p>
{!collapsed && (
<div className={styles.usertext}>