Merge branch 'dev' of https://github.com/Discours/discoursio-webapp into fix/all-topics-page

This commit is contained in:
kvakazyambra 2024-04-26 09:19:33 +03:00
commit ece5f2505f

View File

@ -112,13 +112,9 @@ export const AuthorView = (props: Props) => {
onMount(() => { onMount(() => {
if (!modal) hideModal() if (!modal) hideModal()
checkBioHeight()
fetchData(props.authorSlug) fetchData(props.authorSlug)
checkBioHeight()
// pagination loadMore()
if (sortedArticles().length === PRERENDERED_ARTICLES_COUNT) {
loadMore()
}
}) })
const pages = createMemo<Shout[][]>(() => const pages = createMemo<Shout[][]>(() =>
@ -132,12 +128,17 @@ export const AuthorView = (props: Props) => {
setCommented(data) setCommented(data)
} }
createEffect(() => { const authorSlug = createMemo(() => author()?.slug)
if (author()) { createEffect(
fetchData(author().slug) on(
fetchComments(author()) () => authorSlug(),
} () => {
}) fetchData(authorSlug())
fetchComments(author())
},
{ defer: true },
),
)
const ogImage = createMemo(() => const ogImage = createMemo(() =>
author()?.pic author()?.pic