From 539c0454fff47e7d47a7919e3110a4da3b1b5738 Mon Sep 17 00:00:00 2001 From: Igor Lobanov Date: Fri, 25 Nov 2022 10:38:26 +0100 Subject: [PATCH] author loading fix --- src/components/Pages/AuthorPage.tsx | 2 +- src/components/Views/Author.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Pages/AuthorPage.tsx b/src/components/Pages/AuthorPage.tsx index 2006c8a2..556fbea3 100644 --- a/src/components/Pages/AuthorPage.tsx +++ b/src/components/Pages/AuthorPage.tsx @@ -38,7 +38,7 @@ export const AuthorPage = (props: PageProps) => { return ( }> - + ) diff --git a/src/components/Views/Author.tsx b/src/components/Views/Author.tsx index 59f4ab3f..94635d88 100644 --- a/src/components/Views/Author.tsx +++ b/src/components/Views/Author.tsx @@ -17,6 +17,7 @@ import { splitToPages } from '../../utils/splitToPages' type AuthorProps = { shouts: Shout[] author: Author + authorSlug: string // FIXME author topics from server // topics: Topic[] } @@ -36,7 +37,7 @@ export const AuthorView = (props: AuthorProps) => { const { topicsByAuthor } = useTopicsStore() const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false) - const author = createMemo(() => authorEntities()[props.author.slug]) + const author = createMemo(() => authorEntities()[props.authorSlug]) const { searchParams, changeSearchParam } = useRouter() const loadMore = async () => {