sort-order-fix
This commit is contained in:
parent
96c52ae2b4
commit
bfc7ed15d8
|
@ -11,7 +11,7 @@ import styles from './AuthorsList.module.scss'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
class?: string
|
class?: string
|
||||||
query: 'shouts' | 'authors'
|
query: 'followers' | 'shouts'
|
||||||
searchQuery?: string
|
searchQuery?: string
|
||||||
allAuthorsLength?: number
|
allAuthorsLength?: number
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ export const AuthorsList = (props: Props) => {
|
||||||
const [currentPage, setCurrentPage] = createSignal({ shouts: 0, followers: 0 })
|
const [currentPage, setCurrentPage] = createSignal({ shouts: 0, followers: 0 })
|
||||||
const [allLoaded, setAllLoaded] = createSignal(false)
|
const [allLoaded, setAllLoaded] = createSignal(false)
|
||||||
|
|
||||||
const fetchAuthors = async (queryType: 'shouts' | 'authors', page: number) => {
|
const fetchAuthors = async (queryType: Props['query'], page: number) => {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
|
|
||||||
console.log('!!! AAA:')
|
console.log('!!! AAA:')
|
||||||
|
|
|
@ -167,7 +167,7 @@ export const AllAuthors = (props: Props) => {
|
||||||
<AuthorsList
|
<AuthorsList
|
||||||
allAuthorsLength={sortedAuthors()?.length}
|
allAuthorsLength={sortedAuthors()?.length}
|
||||||
searchQuery={searchQuery()}
|
searchQuery={searchQuery()}
|
||||||
query={searchParams().by === 'shouts' ? 'shouts' : 'authors'}
|
query={searchParams().by === 'followers' ? 'followers': 'shouts'}
|
||||||
/>
|
/>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user