From b5e25e0d6d1c1344dc4a9eb6ecdff0e9221182ba Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 22 Jul 2024 17:15:47 +0300 Subject: [PATCH] fixtest --- src/author/[slug]/[...tab].tsx | 3 +-- src/context/feed.tsx | 1 + src/routes/[slug]/[...tab].tsx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/author/[slug]/[...tab].tsx b/src/author/[slug]/[...tab].tsx index 67606e23..b81a0fb4 100644 --- a/src/author/[slug]/[...tab].tsx +++ b/src/author/[slug]/[...tab].tsx @@ -5,7 +5,7 @@ import { FourOuFourView } from '~/components/Views/FourOuFour' import { LoadMoreItems, LoadMoreWrapper } from '~/components/_shared/LoadMoreWrapper' import { PageLayout } from '~/components/_shared/PageLayout' import { useAuthors } from '~/context/authors' -import { useFeed } from '~/context/feed' +import { SHOUTS_PER_PAGE, useFeed } from '~/context/feed' import { useLocalize } from '~/context/localize' import { ReactionsProvider } from '~/context/reactions' import { loadAuthors, loadShouts, loadTopics } from '~/graphql/api/public' @@ -17,7 +17,6 @@ import { Topic } from '~/graphql/schema/core.gen' import { getImageUrl } from '~/lib/getThumbUrl' -import { SHOUTS_PER_PAGE } from '../../(main)' const fetchAuthorShouts = async (slug: string, offset?: number) => { const opts: LoadShoutsOptions = { filters: { author: slug }, limit: SHOUTS_PER_PAGE, offset } diff --git a/src/context/feed.tsx b/src/context/feed.tsx index 7d1617aa..84a2a697 100644 --- a/src/context/feed.tsx +++ b/src/context/feed.tsx @@ -14,6 +14,7 @@ import { byStat } from '../lib/sort' import { useGraphQL } from './graphql' export const PRERENDERED_ARTICLES_COUNT = 5 +export const SHOUTS_PER_PAGE = 20 type FeedContextType = { sortedFeed: Accessor diff --git a/src/routes/[slug]/[...tab].tsx b/src/routes/[slug]/[...tab].tsx index df403bd1..3ecb052f 100644 --- a/src/routes/[slug]/[...tab].tsx +++ b/src/routes/[slug]/[...tab].tsx @@ -12,7 +12,7 @@ import { descFromBody, keywordsFromTopics } from '~/utils/meta' import { FullArticle } from '../../components/Article/FullArticle' import { PageLayout } from '../../components/_shared/PageLayout' import { ReactionsProvider } from '../../context/reactions' -import AuthorPage, { AuthorPageProps } from '../author/[slug]/[...tab]' +// import AuthorPage, { AuthorPageProps } from '../author/[slug]/[...tab]' import TopicPage, { TopicPageProps } from '../topic/[slug]/[...tab]' const fetchShout = async (slug: string): Promise => { @@ -46,8 +46,8 @@ export default (props: RouteSectionProps) => { ...props.params, slug: props.params.slug.slice(1, props.params.slug.length) } - } as RouteSectionProps - return + } // as RouteSectionProps + return // } if (props.params.slug.startsWith('!')) {