fmt
This commit is contained in:
parent
d4deef9bb6
commit
bfc78d9df3
|
@ -1,6 +1,6 @@
|
|||
import { A, createAsync, useLocation, useNavigate, useSearchParams } from '@solidjs/router'
|
||||
import { clsx } from 'clsx'
|
||||
import { For, Show, createEffect, createMemo, createSignal, on, onMount } from 'solid-js'
|
||||
import { For, Show, createEffect, createMemo, createSignal, on } from 'solid-js'
|
||||
import { DropDown } from '~/components/_shared/DropDown'
|
||||
import { Option } from '~/components/_shared/DropDown/DropDown'
|
||||
import { Icon } from '~/components/_shared/Icon'
|
||||
|
|
|
@ -72,14 +72,14 @@ export default function AllAuthorsPage(props: RouteSectionProps<AllAuthorsData>)
|
|||
title={`${t('Discours')} :: ${t('All authors')}`}
|
||||
desc="List of authors of the open editorial community"
|
||||
>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<AllAuthors
|
||||
isLoaded={Boolean(data()?.authors)}
|
||||
authors={data()?.authors || []}
|
||||
authorsByFollowers={data()?.authorsByFollowers}
|
||||
authorsByShouts={data()?.authorsByShouts}
|
||||
/>
|
||||
</Suspense>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<AllAuthors
|
||||
isLoaded={Boolean(data()?.authors)}
|
||||
authors={data()?.authors || []}
|
||||
authorsByFollowers={data()?.authorsByFollowers}
|
||||
authorsByShouts={data()?.authorsByShouts}
|
||||
/>
|
||||
</Suspense>
|
||||
</PageLayout>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ const fetchPublishedShouts = async (offset?: number, _client?: Client) => {
|
|||
return await shoutsLoader()
|
||||
}
|
||||
|
||||
|
||||
export const route = {
|
||||
load: async ({ location: { query } }: RouteSectionProps<{ articles: Shout[] }>) => {
|
||||
const offset: number = Number.parseInt(query.offset, 10)
|
||||
|
|
|
@ -48,20 +48,20 @@ export default () => {
|
|||
|
||||
return (
|
||||
<PageLayout withPadding={true} title={`${t('Discours')} :: ${t('Search')}`}>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<Show when={isLoaded()} fallback={<Loading />}>
|
||||
<Show
|
||||
when={searchResults().length > 0}
|
||||
fallback={
|
||||
<Show when={hasSearched()} fallback={<div>{t('Enter your search query')}</div>}>
|
||||
<div>{t('No results found')}</div>
|
||||
</Show>
|
||||
}
|
||||
>
|
||||
<SearchView results={searchResults() as SearchResult[]} query={searchParams?.q || ''} />
|
||||
</Show>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<Show when={isLoaded()} fallback={<Loading />}>
|
||||
<Show
|
||||
when={searchResults().length > 0}
|
||||
fallback={
|
||||
<Show when={hasSearched()} fallback={<div>{t('Enter your search query')}</div>}>
|
||||
<div>{t('No results found')}</div>
|
||||
</Show>
|
||||
}
|
||||
>
|
||||
<SearchView results={searchResults() as SearchResult[]} query={searchParams?.q || ''} />
|
||||
</Show>
|
||||
</Suspense>
|
||||
</Show>
|
||||
</Suspense>
|
||||
</PageLayout>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ export default (props: RouteSectionProps<{ topics: Topic[] }>) => {
|
|||
headerTitle={`${t('Discours')} :: ${t('All topics')}`}
|
||||
desc="Thematic table of contents of the magazine. Here you can find all the topics that the community authors wrote about"
|
||||
>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<AllTopics topics={topics() as Topic[]} />
|
||||
</Suspense>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<AllTopics topics={topics() as Topic[]} />
|
||||
</Suspense>
|
||||
</PageLayout>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -65,11 +65,11 @@ export default (props: RouteSectionProps<{ articles: Shout[] }>) => {
|
|||
slug={topic()?.slug}
|
||||
cover={cover()}
|
||||
>
|
||||
<TopicView
|
||||
topic={topic() as Topic}
|
||||
topicSlug={props.params.slug}
|
||||
shouts={articles() as Shout[]}
|
||||
/>
|
||||
<TopicView
|
||||
topic={topic() as Topic}
|
||||
topicSlug={props.params.slug}
|
||||
shouts={articles() as Shout[]}
|
||||
/>
|
||||
</PageLayout>
|
||||
</Suspense>
|
||||
</ErrorBoundary>
|
||||
|
|
Loading…
Reference in New Issue
Block a user