Skip to content

Commit 3f13333

Browse files
committed
remove redundant sate
1 parent 37c7bd6 commit 3f13333

File tree

1 file changed

+1
-5
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/Dialog

1 file changed

+1
-5
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Comments/Dialog/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,8 @@ const CommentBody = ({ comment, editing, setEditing }) => {
347347
};
348348

349349
const Replies = ({ replies, repliesRenderedCallback }) => {
350-
const [repliesLoaded, setRepliesLoaded] = React.useState(!!replies[0]);
351350
const [isAnimating, setAnimating] = React.useState(true);
352-
353-
React.useEffect(() => {
354-
setRepliesLoaded(!!replies[0]);
355-
}, [replies]);
351+
const repliesLoaded = !!replies[0];
356352

357353
/** Wait another <delay>ms after the dialog has transitioned into view */
358354
const delay = DIALOG_TRANSITION_DURATION + REPLY_TRANSITION_DELAY;

0 commit comments

Comments
 (0)