mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 13:04:17 +03:00
interface: show currently editing comment as pending
This commit is contained in:
parent
473b280bf4
commit
783c4f2ee2
@ -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
|
||||
|
@ -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}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
Loading…
Reference in New Issue
Block a user