Show Preloader only on first request for comments in Profile sidebar

This commit is contained in:
esvyridov
2021-12-23 17:44:45 -06:00
committed by Umputun
parent 6ec10c877b
commit 78e2be8ea4
+1 -1
View File
@@ -210,7 +210,7 @@ export function Profile() {
</Button>
</div>
)}
{isCommentsLoading && <Preloader className={styles.preloader} />}
{comments === null && isCommentsLoading && <Preloader className={styles.preloader} />}
{comments !== null && commentsJSX}
</section>
{isCurrent ? (