This commit is contained in:
Untone 2024-07-22 17:15:47 +03:00
parent 1f58385b95
commit b5e25e0d6d
3 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import { FourOuFourView } from '~/components/Views/FourOuFour'
import { LoadMoreItems, LoadMoreWrapper } from '~/components/_shared/LoadMoreWrapper' import { LoadMoreItems, LoadMoreWrapper } from '~/components/_shared/LoadMoreWrapper'
import { PageLayout } from '~/components/_shared/PageLayout' import { PageLayout } from '~/components/_shared/PageLayout'
import { useAuthors } from '~/context/authors' import { useAuthors } from '~/context/authors'
import { useFeed } from '~/context/feed' import { SHOUTS_PER_PAGE, useFeed } from '~/context/feed'
import { useLocalize } from '~/context/localize' import { useLocalize } from '~/context/localize'
import { ReactionsProvider } from '~/context/reactions' import { ReactionsProvider } from '~/context/reactions'
import { loadAuthors, loadShouts, loadTopics } from '~/graphql/api/public' import { loadAuthors, loadShouts, loadTopics } from '~/graphql/api/public'
@ -17,7 +17,6 @@ import {
Topic Topic
} from '~/graphql/schema/core.gen' } from '~/graphql/schema/core.gen'
import { getImageUrl } from '~/lib/getThumbUrl' import { getImageUrl } from '~/lib/getThumbUrl'
import { SHOUTS_PER_PAGE } from '../../(main)'
const fetchAuthorShouts = async (slug: string, offset?: number) => { const fetchAuthorShouts = async (slug: string, offset?: number) => {
const opts: LoadShoutsOptions = { filters: { author: slug }, limit: SHOUTS_PER_PAGE, offset } const opts: LoadShoutsOptions = { filters: { author: slug }, limit: SHOUTS_PER_PAGE, offset }

View File

@ -14,6 +14,7 @@ import { byStat } from '../lib/sort'
import { useGraphQL } from './graphql' import { useGraphQL } from './graphql'
export const PRERENDERED_ARTICLES_COUNT = 5 export const PRERENDERED_ARTICLES_COUNT = 5
export const SHOUTS_PER_PAGE = 20
type FeedContextType = { type FeedContextType = {
sortedFeed: Accessor<Shout[]> sortedFeed: Accessor<Shout[]>

View File

@ -12,7 +12,7 @@ import { descFromBody, keywordsFromTopics } from '~/utils/meta'
import { FullArticle } from '../../components/Article/FullArticle' import { FullArticle } from '../../components/Article/FullArticle'
import { PageLayout } from '../../components/_shared/PageLayout' import { PageLayout } from '../../components/_shared/PageLayout'
import { ReactionsProvider } from '../../context/reactions' 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]' import TopicPage, { TopicPageProps } from '../topic/[slug]/[...tab]'
const fetchShout = async (slug: string): Promise<Shout | undefined> => { const fetchShout = async (slug: string): Promise<Shout | undefined> => {
@ -46,8 +46,8 @@ export default (props: RouteSectionProps<SlugPageProps>) => {
...props.params, ...props.params,
slug: props.params.slug.slice(1, props.params.slug.length) slug: props.params.slug.slice(1, props.params.slug.length)
} }
} as RouteSectionProps<AuthorPageProps> } // as RouteSectionProps<AuthorPageProps>
return <AuthorPage {...patchedProps} /> return <Loading /> //</><AuthorPage {...patchedProps} />
} }
if (props.params.slug.startsWith('!')) { if (props.params.slug.startsWith('!')) {