load-comments-fix

This commit is contained in:
Untone 2024-01-31 18:15:23 +03:00
parent cfca2dbbab
commit 2103db3ebd

View File

@ -144,22 +144,16 @@ export const AuthorView = (props: Props) => {
} }
const [commented, setCommented] = createSignal<Reaction[]>([]) const [commented, setCommented] = createSignal<Reaction[]>([])
createEffect( createEffect(() => {
on( if (author() && getPage().route === 'authorComments') {
author,
(a: Author) => {
if (getPage().route === 'authorComments') {
console.debug('[components.Author] routed to comments') console.debug('[components.Author] routed to comments')
try { try {
if (a) fetchComments(a) fetchComments(author())
} catch (error) { } catch (error) {
console.error('[components.Author] fetch error', error) console.error('[components.Author] fetch error', error)
} }
} }
}, })
{ defer: true },
),
)
const ogImage = createMemo(() => const ogImage = createMemo(() =>
author()?.pic author()?.pic