From 35f39da99e80ce925a237dcae31324e614fcd018 Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 6 Jul 2024 01:24:56 +0300 Subject: [PATCH] topics-render-fix2 --- src/components/Views/AllTopics/AllTopics.tsx | 4 ++-- src/routes/author/(all-authors).tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Views/AllTopics/AllTopics.tsx b/src/components/Views/AllTopics/AllTopics.tsx index 18aedc5c..905c0d9d 100644 --- a/src/components/Views/AllTopics/AllTopics.tsx +++ b/src/components/Views/AllTopics/AllTopics.tsx @@ -32,8 +32,8 @@ export const AllTopics = (props: Props) => { const { setTopicsSort, sortedTopics } = useTopics() const topics = createMemo(() => sortedTopics() || props.topics) const [searchParams, changeSearchParams] = useSearchParams<{ by?: string }>() - createEffect(on(() => searchParams?.by || 'shouts', setTopicsSort, {defer:true})) - onMount(() => setTimeout(() => !searchParams?.by && changeSearchParams({ by: 'shouts'}), 1)) + createEffect(on(() => searchParams?.by || 'shouts', setTopicsSort, { defer: true })) + onMount(() => setTimeout(() => !searchParams?.by && changeSearchParams({ by: 'shouts' }), 1)) // sorted derivative const byLetter = createMemo<{ [letter: string]: Topic[] }>(() => { diff --git a/src/routes/author/(all-authors).tsx b/src/routes/author/(all-authors).tsx index d6abafd0..cd296bca 100644 --- a/src/routes/author/(all-authors).tsx +++ b/src/routes/author/(all-authors).tsx @@ -47,7 +47,7 @@ export const route = { export default function AllAuthorsPage(props: RouteSectionProps<{ authors: Author[] }>) { const { t } = useLocalize() - const authors = createAsync(async () => props.data.authors || await fetchData()) + const authors = createAsync(async () => props.data.authors || (await fetchData())) return (