From 5de1441895de2d18cced54af9a75e936aebaace6 Mon Sep 17 00:00:00 2001 From: Alexey Khaov Date: Tue, 24 Jan 2023 01:12:28 +0300 Subject: [PATCH] Set default mode on the author page --- src/components/Views/Author.tsx | 41 +++------------------------------ 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/src/components/Views/Author.tsx b/src/components/Views/Author.tsx index ef63ac75..38fec700 100644 --- a/src/components/Views/Author.tsx +++ b/src/components/Views/Author.tsx @@ -50,6 +50,8 @@ export const AuthorView = (props: AuthorProps) => { const subscribers = Array.from({ length: 12 }).fill(author()) const { searchParams, changeSearchParam } = useRouter() + changeSearchParam('by', 'rating') + const loadMore = async () => { saveScrollPosition() const { hasMore } = await loadShouts({ @@ -96,43 +98,6 @@ export const AuthorView = (props: AuthorProps) => { } }) - const zhopa = { - 'v-kramer': { - _id: 'v-kramer', - id: 33, - slug: 'v-kramer', - name: 'Владислав Крамер', - bio: 'юрист, публицист, охотник на ведьм', - about: null, - userpic: '', - communities: null, - links: [], - createdAt: '2016-04-25T10:21:25.065000', - lastSeen: '2023-01-22T14:37:55.058203' - }, - 'aleksei-bodyashkin': { - id: 831, - name: 'Алексей Бодяшкин', - slug: 'aleksei-bodyashkin', - userpic: - 'https://assets.discours.io/unsafe/100x/production/image/d4d5bf40-974c-11ed-9568-bf8d9bd79f61.jpg' - }, - 'vsevolod-korolyov': { - id: 680, - name: 'Всеволод Королёв', - slug: 'vsevolod-korolyov', - userpic: - 'https://assets.discours.io/unsafe/100x/production/image/5b959660-944f-11ec-86dd-e3ee00090109.jpg' - }, - 'igor-bobyrev': { id: 790, name: 'Игорь Бобырев', slug: 'igor-bobyrev', userpic: '' }, - 'natasha-lozinskaya': { - id: 829, - name: 'Наташа Лозинская', - slug: 'natasha-lozinskaya', - userpic: '' - } - } - return (
{t('Loading')}
}> @@ -223,7 +188,7 @@ export const AuthorView = (props: AuthorProps) => { - +