mirror of
https://github.com/plebbit/seedit.git
synced 2026-04-21 23:58:21 -04:00
chore: prettify, fix eslint
This commit is contained in:
@@ -263,14 +263,14 @@ const Header = () => {
|
||||
<SubscribeButton address={params.subplebbitAddress} />
|
||||
</span>
|
||||
)}
|
||||
{!isMobile && (
|
||||
<div className={`${styles.tabs} ${hasFewTabs ? styles.fewTabs : ''}`}>
|
||||
<ul className={styles.tabMenu}>
|
||||
<HeaderTabs />
|
||||
{(isSubplebbit || isSubplebbitSubmit || isPost || isProfile || isAuthor) && <AboutButton />}
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
{!isMobile && (
|
||||
<div className={`${styles.tabs} ${hasFewTabs ? styles.fewTabs : ''}`}>
|
||||
<ul className={styles.tabMenu}>
|
||||
<HeaderTabs />
|
||||
{(isSubplebbit || isSubplebbitSubmit || isPost || isProfile || isAuthor) && <AboutButton />}
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{isMobile && (
|
||||
<div className={`${styles.tabs} ${hasFewTabs ? styles.fewTabs : ''}`}>
|
||||
|
||||
@@ -51,7 +51,7 @@ const Author = () => {
|
||||
increaseViewportBy={{ bottom: 1200, top: 600 }}
|
||||
totalCount={authorComments?.length || 0}
|
||||
data={authorComments}
|
||||
itemContent={(index, post) => (post && <Post index={index} post={post} />)}
|
||||
itemContent={(index, post) => post && <Post index={index} post={post} />}
|
||||
useWindowScroll={true}
|
||||
components={{ Footer }}
|
||||
endReached={loadMore}
|
||||
|
||||
@@ -19,15 +19,9 @@ const Profile = () => {
|
||||
const isUpvoted = isUpvotedView(location.pathname);
|
||||
const isDownvoted = isDownvotedView(location.pathname);
|
||||
|
||||
const upvotedCommentCids = useMemo(() =>
|
||||
accountVotes?.filter(vote => vote.vote === 1).map(vote => vote.commentCid) || [],
|
||||
[accountVotes]
|
||||
);
|
||||
const upvotedCommentCids = useMemo(() => accountVotes?.filter((vote) => vote.vote === 1).map((vote) => vote.commentCid) || [], [accountVotes]);
|
||||
|
||||
const downvotedCommentCids = useMemo(() =>
|
||||
accountVotes?.filter(vote => vote.vote === -1).map(vote => vote.commentCid) || [],
|
||||
[accountVotes]
|
||||
);
|
||||
const downvotedCommentCids = useMemo(() => accountVotes?.filter((vote) => vote.vote === -1).map((vote) => vote.commentCid) || [], [accountVotes]);
|
||||
|
||||
const { comments: upvotedComments } = useComments({ commentCids: upvotedCommentCids });
|
||||
const { comments: downvotedComments } = useComments({ commentCids: downvotedCommentCids });
|
||||
@@ -45,7 +39,7 @@ const Profile = () => {
|
||||
});
|
||||
window.addEventListener('scroll', setLastVirtuosoState);
|
||||
return () => window.removeEventListener('scroll', setLastVirtuosoState);
|
||||
}, []);
|
||||
}, [account?.shortAddress, params.sortType]);
|
||||
|
||||
const lastVirtuosoState = lastVirtuosoStates?.[account?.shortAddress + params.sortType];
|
||||
|
||||
@@ -61,7 +55,7 @@ const Profile = () => {
|
||||
increaseViewportBy={{ bottom: 1200, top: 600 }}
|
||||
totalCount={accountComments?.length || 0}
|
||||
data={virtuosoData}
|
||||
itemContent={(index, post) => (post && <Post index={index} post={post} />)}
|
||||
itemContent={(index, post) => post && <Post index={index} post={post} />}
|
||||
useWindowScroll={true}
|
||||
ref={virtuosoRef}
|
||||
restoreStateFrom={lastVirtuosoState}
|
||||
|
||||
Reference in New Issue
Block a user