diff --git a/src/components/Views/AllAuthors/AllAuthors.tsx b/src/components/Views/AllAuthors/AllAuthors.tsx index eea1751e..d1c30b42 100644 --- a/src/components/Views/AllAuthors/AllAuthors.tsx +++ b/src/components/Views/AllAuthors/AllAuthors.tsx @@ -37,11 +37,11 @@ export const AllAuthors = (props: Props) => { const [filteredAuthors, setFilteredAuthors] = createSignal([]) createEffect(() => { - // Load all authors initially - fetchAuthors(searchParams.by || 'name', 0) + // Load all authors initially + fetchAuthors(searchParams.by || 'name', 0) }) -/* const authors = createMemo(() => { + /* const authors = createMemo(() => { let sortedAuthors = [...props.authors] sortedAuthors = authorsSorted() if (!searchParams.by || searchParams.by === 'name') { @@ -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 = () => (
diff --git a/src/components/_shared/Image/Image.tsx b/src/components/_shared/Image/Image.tsx index 01966289..97959e53 100644 --- a/src/components/_shared/Image/Image.tsx +++ b/src/components/_shared/Image/Image.tsx @@ -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 & { diff --git a/src/routes/author/(all-authors).tsx b/src/routes/author/(all-authors).tsx index 12e91716..35e7ce27 100644 --- a/src/routes/author/(all-authors).tsx +++ b/src/routes/author/(all-authors).tsx @@ -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) { @@ -61,10 +59,7 @@ export default function AllAuthorsPage(props: RouteSectionProps) desc="List of authors of the open editorial community" > }> - + )