interface: show currently editing comment as pending

This commit is contained in:
Logan Allen 2020-11-18 18:00:48 -06:00
parent 473b280bf4
commit 783c4f2ee2
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ export function CommentItem(props: CommentItemProps) {
const updateUrl = `${props.baseUrl}/${commentIndex}`
return (
<Box mb={4} opacity={post?.pending ? '60%' : '100%'}>
<Box mb={4} opacity={props.pending ? '60%' : '100%'}>
<Row bg="white" my={3}>
<Author
showImage

View File

@ -100,7 +100,6 @@ export function Comments(props: CommentsProps) {
/>
) : null )}
{Array.from(comments.children).reverse()
.filter(([idx, _]) => idx.toString() !== props.editCommentId)
.map(([idx, comment]) => {
return (
<CommentItem
@ -114,6 +113,7 @@ export function Comments(props: CommentsProps) {
hideAvatars={props.hideAvatars}
remoteContentPolicy={props.remoteContentPolicy}
baseUrl={props.baseUrl}
pending={idx.toString() === props.editCommentId}
/>
);
})}