blur the comment until it's ready

This commit is contained in:
Riley Davis
2017-03-07 10:06:03 -07:00
parent d9d086c61e
commit 3a31ca8d38
3 changed files with 8 additions and 2 deletions
+6 -1
View File
@@ -3,5 +3,10 @@
}
.Comment {
}
.pendingComment {
filter: blur(2px);
pointer-events: none;
}
+1
View File
@@ -116,6 +116,7 @@ class Comment extends React.Component {
const dontagree = getActionSummary('DontAgreeActionSummary', comment);
let commentClass = parentId ? `reply ${styles.Reply}` : `comment ${styles.Comment}`;
commentClass += highlighted === comment.id ? ' highlighted-comment' : '';
commentClass += comment.id === 'pending' ? ' pendingComment' : '';
// call a function, and if it errors, call addNotification('error', ...) (e.g. to show user a snackbar)
const notifyOnError = (fn, errorToMessage) => async () => {
@@ -35,7 +35,7 @@ export const postComment = graphql(POST_COMMENT, {
action_summaries: [],
tags: [],
status: null,
id: `${Date.now()}_temp_id`
id: 'pending'
}
}
},