topics-render-fix2
This commit is contained in:
parent
2d5e9877ee
commit
35f39da99e
|
@ -32,8 +32,8 @@ export const AllTopics = (props: Props) => {
|
||||||
const { setTopicsSort, sortedTopics } = useTopics()
|
const { setTopicsSort, sortedTopics } = useTopics()
|
||||||
const topics = createMemo(() => sortedTopics() || props.topics)
|
const topics = createMemo(() => sortedTopics() || props.topics)
|
||||||
const [searchParams, changeSearchParams] = useSearchParams<{ by?: string }>()
|
const [searchParams, changeSearchParams] = useSearchParams<{ by?: string }>()
|
||||||
createEffect(on(() => searchParams?.by || 'shouts', setTopicsSort, {defer:true}))
|
createEffect(on(() => searchParams?.by || 'shouts', setTopicsSort, { defer: true }))
|
||||||
onMount(() => setTimeout(() => !searchParams?.by && changeSearchParams({ by: 'shouts'}), 1))
|
onMount(() => setTimeout(() => !searchParams?.by && changeSearchParams({ by: 'shouts' }), 1))
|
||||||
|
|
||||||
// sorted derivative
|
// sorted derivative
|
||||||
const byLetter = createMemo<{ [letter: string]: Topic[] }>(() => {
|
const byLetter = createMemo<{ [letter: string]: Topic[] }>(() => {
|
||||||
|
|
|
@ -47,7 +47,7 @@ export const route = {
|
||||||
|
|
||||||
export default function AllAuthorsPage(props: RouteSectionProps<{ authors: Author[] }>) {
|
export default function AllAuthorsPage(props: RouteSectionProps<{ authors: Author[] }>) {
|
||||||
const { t } = useLocalize()
|
const { t } = useLocalize()
|
||||||
const authors = createAsync<Author[]>(async () => props.data.authors || await fetchData())
|
const authors = createAsync<Author[]>(async () => props.data.authors || (await fetchData()))
|
||||||
return (
|
return (
|
||||||
<PageLayout withPadding={true} title={`${t('Discours')} :: ${t('All authors')}`}>
|
<PageLayout withPadding={true} title={`${t('Discours')} :: ${t('All authors')}`}>
|
||||||
<ReactionsProvider>
|
<ReactionsProvider>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user