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