From 72610d10b5d832b235b6f9de212e0e81532a385e Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 29 Feb 2024 23:54:34 +0300 Subject: [PATCH] wip --- src/pages/allAuthors.page.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/allAuthors.page.tsx b/src/pages/allAuthors.page.tsx index 7079e8af..b0a78e38 100644 --- a/src/pages/allAuthors.page.tsx +++ b/src/pages/allAuthors.page.tsx @@ -5,10 +5,11 @@ import { createEffect, createSignal, onMount } from 'solid-js' import { AllAuthors } from '../components/Views/AllAuthors/' import { PageLayout } from '../components/_shared/PageLayout' import { useLocalize } from '../context/localize' -import { loadAllAuthors } from '../stores/zine/authors' +import {loadAllAuthors, loadAuthors} from '../stores/zine/authors' +import {PAGE_SIZE} from "../components/Views/AllTopics/AllTopics"; export const AllAuthorsPage = (props: PageProps) => { - const [isLoaded, setIsLoaded] = createSignal(Boolean(props.allAuthors)) + const [isLoaded, setIsLoaded] = createSignal(Boolean(props.allAuthors && props.topFollowedAuthors && props.topWritingAuthors)) const { t } = useLocalize() @@ -18,12 +19,14 @@ export const AllAuthorsPage = (props: PageProps) => { } await loadAllAuthors() + await loadAuthors({ by: { order: 'shouts' }, limit: PAGE_SIZE }) + await loadAuthors({ by: { order: 'followers' }, limit: PAGE_SIZE }) setIsLoaded(true) }) return ( - + ) }