sort-order-fix
This commit is contained in:
parent
96c52ae2b4
commit
bfc7ed15d8
|
@ -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:')
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user