author loading fix

This commit is contained in:
Igor Lobanov 2022-11-25 10:38:26 +01:00
parent 75c3c33d3b
commit 539c0454ff
2 changed files with 3 additions and 2 deletions

View File

@ -38,7 +38,7 @@ export const AuthorPage = (props: PageProps) => {
return (
<PageWrap>
<Show when={isLoaded()} fallback={<Loading />}>
<AuthorView author={props.author} shouts={props.shouts} />
<AuthorView author={props.author} shouts={props.shouts} authorSlug={slug()} />
</Show>
</PageWrap>
)

View File

@ -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<AuthorPageSearchParams>()
const loadMore = async () => {