sort-order-fix

This commit is contained in:
Untone 2024-02-26 01:40:09 +03:00
parent 96c52ae2b4
commit bfc7ed15d8
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import styles from './AuthorsList.module.scss'
type Props = {
class?: string
query: 'shouts' | 'authors'
query: 'followers' | 'shouts'
searchQuery?: string
allAuthorsLength?: number
}
@ -25,7 +25,7 @@ export const AuthorsList = (props: Props) => {
const [currentPage, setCurrentPage] = createSignal({ shouts: 0, followers: 0 })
const [allLoaded, setAllLoaded] = createSignal(false)
const fetchAuthors = async (queryType: 'shouts' | 'authors', page: number) => {
const fetchAuthors = async (queryType: Props['query'], page: number) => {
setLoading(true)
console.log('!!! AAA:')

View File

@ -167,7 +167,7 @@ export const AllAuthors = (props: Props) => {
<AuthorsList
allAuthorsLength={sortedAuthors()?.length}
searchQuery={searchQuery()}
query={searchParams().by === 'shouts' ? 'shouts' : 'authors'}
query={searchParams().by === 'followers' ? 'followers': 'shouts'}
/>
</Show>
</div>