postmerge
This commit is contained in:
parent
607d986293
commit
9733eff104
|
@ -68,7 +68,6 @@ export const AllAuthors = (props: Props) => {
|
|||
setFilteredAuthors(dummyFilter(authors(), searchQuery(), lang()) as Author[])
|
||||
})
|
||||
|
||||
|
||||
const byLetterFiltered = createMemo<{ [letter: string]: Author[] }>(() => {
|
||||
if (!(filteredAuthors()?.length > 0)) return {}
|
||||
return filteredAuthors().reduce(
|
||||
|
@ -114,7 +113,6 @@ export const AllAuthors = (props: Props) => {
|
|||
fetchAuthors(by, nextPage).then(() => setCurrentPage({ ...currentPage(), [by]: nextPage }))
|
||||
}
|
||||
|
||||
|
||||
const TabNavigator = () => (
|
||||
<div class="row">
|
||||
<div class="col-lg-20 col-xl-18">
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import type { JSX } from 'solid-js'
|
||||
|
||||
import { Link } from '@solidjs/meta'
|
||||
import type { JSX } from 'solid-js'
|
||||
import { splitProps } from 'solid-js'
|
||||
|
||||
import { getImageUrl } from '~/lib/getThumbUrl'
|
||||
|
||||
type Props = JSX.ImgHTMLAttributes<HTMLImageElement> & {
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
import { RouteDefinition, RoutePreloadFuncArgs, type RouteSectionProps, createAsync } from '@solidjs/router'
|
||||
import { Suspense, createEffect, on } from 'solid-js'
|
||||
import { AllAuthors } from '~/components/Views/AllAuthors'
|
||||
import { AUTHORS_PER_PAGE } from '~/components/Views/AllAuthors/AllAuthors'
|
||||
import { Loading } from '~/components/_shared/Loading'
|
||||
import { PageLayout } from '~/components/_shared/PageLayout'
|
||||
import { useAuthors } from '~/context/authors'
|
||||
import { useLocalize } from '~/context/localize'
|
||||
import { loadAuthors, loadAuthorsAll } from '~/graphql/api/public'
|
||||
import { Author, AuthorsBy } from '~/graphql/schema/core.gen'
|
||||
import { loadAuthorsAll } from '~/graphql/api/public'
|
||||
import { Author } from '~/graphql/schema/core.gen'
|
||||
|
||||
// Fetch Function
|
||||
const fetchAllAuthors = async () => {
|
||||
|
@ -17,7 +16,7 @@ const fetchAllAuthors = async () => {
|
|||
|
||||
//Route Defenition
|
||||
export const route = {
|
||||
load: async ({ location: { query } }: RoutePreloadFuncArgs) => {
|
||||
load: async ({ location: { query: _q } }: RoutePreloadFuncArgs) => {
|
||||
return {
|
||||
authors: await fetchAllAuthors()
|
||||
}
|
||||
|
@ -26,7 +25,6 @@ export const route = {
|
|||
|
||||
type AllAuthorsData = { authors: Author[] }
|
||||
|
||||
|
||||
// addAuthors to context
|
||||
|
||||
export default function AllAuthorsPage(props: RouteSectionProps<AllAuthorsData>) {
|
||||
|
@ -61,10 +59,7 @@ export default function AllAuthorsPage(props: RouteSectionProps<AllAuthorsData>)
|
|||
desc="List of authors of the open editorial community"
|
||||
>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<AllAuthors
|
||||
isLoaded={Boolean(data()?.authors)}
|
||||
authors={data()?.authors || []}
|
||||
/>
|
||||
<AllAuthors isLoaded={Boolean(data()?.authors)} authors={data()?.authors || []} />
|
||||
</Suspense>
|
||||
</PageLayout>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user