mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-24 08:08:18 -05:00
fix logic for single comment effect
This commit is contained in:
parent
a5800cb8fb
commit
1605e23d5f
1 changed files with 6 additions and 4 deletions
|
@ -50,11 +50,13 @@ const StudioComments = ({
|
|||
parseInt(window.location.hash.replace(commentHashPrefix, ''), 10));
|
||||
|
||||
useEffect(() => {
|
||||
if (comments.length === 0 && hasFetchedSession) {
|
||||
if (singleCommentId) {
|
||||
handleLoadSingleComment(singleCommentId);
|
||||
return;
|
||||
} else {
|
||||
handleLoadMoreComments();
|
||||
}
|
||||
}
|
||||
if (comments.length === 0 && hasFetchedSession) handleLoadMoreComments();
|
||||
}, [comments.length === 0, hasFetchedSession, singleCommentId]);
|
||||
|
||||
const handleSeeAllComments = () => {
|
||||
|
|
Loading…
Reference in a new issue