From 8fbcde234eecfb525878bd4880c551591c48320a Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 24 Feb 2024 13:50:14 +0300 Subject: [PATCH] footer-fix --- src/components/Article/Comment/Comment.tsx | 2 +- src/components/Article/FullArticle.tsx | 2 +- src/components/AuthorsList/AuthorsList.tsx | 6 +++--- src/components/Feed/ArticleCard/ArticleCard.tsx | 2 +- src/components/Views/AllAuthors.tsx | 1 - src/components/Views/AllAuthors/AllAuthors.tsx | 10 +++++----- src/components/Views/Author/Author.tsx | 2 +- src/context/session.tsx | 6 +++--- src/graphql/client/core.ts | 2 +- 9 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/components/Article/Comment/Comment.tsx b/src/components/Article/Comment/Comment.tsx index c2cbe82f..b0d940db 100644 --- a/src/components/Article/Comment/Comment.tsx +++ b/src/components/Article/Comment/Comment.tsx @@ -46,7 +46,7 @@ export const Comment = (props: Props) => { const canEdit = createMemo( () => Boolean(author()?.id) && - (props.comment?.created_by?.id === author().id || session()?.user?.roles.includes('editor')), + (props.comment?.created_by?.id === author().id || session()?.user?.roles.includes('editor')) ) const comment = createMemo(() => props.comment) diff --git a/src/components/Article/FullArticle.tsx b/src/components/Article/FullArticle.tsx index 69edce87..fb4db9ee 100644 --- a/src/components/Article/FullArticle.tsx +++ b/src/components/Article/FullArticle.tsx @@ -83,7 +83,7 @@ export const FullArticle = (props: Props) => { Boolean(author()?.id) && (props.article?.authors?.some((a) => Boolean(a) && a?.id === author().id) || props.article?.created_by?.id === author().id || - session()?.user?.roles.includes('editor')), + session()?.user?.roles.includes('editor')) ) const mainTopic = createMemo(() => { diff --git a/src/components/AuthorsList/AuthorsList.tsx b/src/components/AuthorsList/AuthorsList.tsx index 236a586e..d26588c7 100644 --- a/src/components/AuthorsList/AuthorsList.tsx +++ b/src/components/AuthorsList/AuthorsList.tsx @@ -28,7 +28,7 @@ export const AuthorsList = (props: Props) => { const result = await apiClient.loadAuthorsBy({ by: { order: queryType }, limit: PAGE_SIZE, - offset: offset, + offset: offset }) if (queryType === 'shouts') { @@ -44,7 +44,7 @@ export const AuthorsList = (props: Props) => { const queryType = props.query const nextPage = currentPage()[queryType] + 1 fetchAuthors(queryType, nextPage).then(() => - setCurrentPage({ ...currentPage(), [queryType]: nextPage }), + setCurrentPage({ ...currentPage(), [queryType]: nextPage }) ) } @@ -70,7 +70,7 @@ export const AuthorsList = (props: Props) => { author={author} isFollowed={{ loaded: !loading(), - value: isOwnerSubscribed(author.id), + value: isOwnerSubscribed(author.id) }} /> diff --git a/src/components/Feed/ArticleCard/ArticleCard.tsx b/src/components/Feed/ArticleCard/ArticleCard.tsx index eda87a48..206e178a 100644 --- a/src/components/Feed/ArticleCard/ArticleCard.tsx +++ b/src/components/Feed/ArticleCard/ArticleCard.tsx @@ -125,7 +125,7 @@ export const ArticleCard = (props: ArticleCardProps) => { Boolean(author()?.id) && (props.article?.authors?.some((a) => Boolean(a) && a?.id === author().id) || props.article?.created_by?.id === author().id || - session()?.user?.roles.includes('editor')), + session()?.user?.roles.includes('editor')) ) const scrollToComments = (event) => { diff --git a/src/components/Views/AllAuthors.tsx b/src/components/Views/AllAuthors.tsx index 8b137891..e69de29b 100644 --- a/src/components/Views/AllAuthors.tsx +++ b/src/components/Views/AllAuthors.tsx @@ -1 +0,0 @@ - diff --git a/src/components/Views/AllAuthors/AllAuthors.tsx b/src/components/Views/AllAuthors/AllAuthors.tsx index c1723891..844a0748 100644 --- a/src/components/Views/AllAuthors/AllAuthors.tsx +++ b/src/components/Views/AllAuthors/AllAuthors.tsx @@ -33,7 +33,7 @@ export const AllAuthors = (props: Props) => { const { searchParams, changeSearchParams } = useRouter() const { sortedAuthors } = useAuthorsStore({ authors: props.authors, - sortBy: searchParams().by || 'name', + sortBy: searchParams().by || 'name' }) const [searchQuery, setSearchQuery] = createSignal('') @@ -51,7 +51,7 @@ export const AllAuthors = (props: Props) => { const byLetter = createMemo<{ [letter: string]: Author[] }>(() => { return sortedAuthors().reduce( (acc, author) => authorLetterReduce(acc, author, lang()), - {} as { [letter: string]: Author[] }, + {} as { [letter: string]: Author[] } ) }) @@ -87,21 +87,21 @@ export const AllAuthors = (props: Props) => {