author loading fix
This commit is contained in:
parent
75c3c33d3b
commit
539c0454ff
|
@ -38,7 +38,7 @@ export const AuthorPage = (props: PageProps) => {
|
||||||
return (
|
return (
|
||||||
<PageWrap>
|
<PageWrap>
|
||||||
<Show when={isLoaded()} fallback={<Loading />}>
|
<Show when={isLoaded()} fallback={<Loading />}>
|
||||||
<AuthorView author={props.author} shouts={props.shouts} />
|
<AuthorView author={props.author} shouts={props.shouts} authorSlug={slug()} />
|
||||||
</Show>
|
</Show>
|
||||||
</PageWrap>
|
</PageWrap>
|
||||||
)
|
)
|
||||||
|
|
|
@ -17,6 +17,7 @@ import { splitToPages } from '../../utils/splitToPages'
|
||||||
type AuthorProps = {
|
type AuthorProps = {
|
||||||
shouts: Shout[]
|
shouts: Shout[]
|
||||||
author: Author
|
author: Author
|
||||||
|
authorSlug: string
|
||||||
// FIXME author topics from server
|
// FIXME author topics from server
|
||||||
// topics: Topic[]
|
// topics: Topic[]
|
||||||
}
|
}
|
||||||
|
@ -36,7 +37,7 @@ export const AuthorView = (props: AuthorProps) => {
|
||||||
const { topicsByAuthor } = useTopicsStore()
|
const { topicsByAuthor } = useTopicsStore()
|
||||||
const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false)
|
const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false)
|
||||||
|
|
||||||
const author = createMemo(() => authorEntities()[props.author.slug])
|
const author = createMemo(() => authorEntities()[props.authorSlug])
|
||||||
const { searchParams, changeSearchParam } = useRouter<AuthorPageSearchParams>()
|
const { searchParams, changeSearchParam } = useRouter<AuthorPageSearchParams>()
|
||||||
|
|
||||||
const loadMore = async () => {
|
const loadMore = async () => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user