diff --git a/src/components/Views/Author/Author.tsx b/src/components/Views/Author/Author.tsx index 97b796f8..44891092 100644 --- a/src/components/Views/Author/Author.tsx +++ b/src/components/Views/Author/Author.tsx @@ -1,15 +1,15 @@ import type { Author, Reaction, Shout, Topic } from '../../../graphql/schema/core.gen' import { getPagePath } from '@nanostores/router' -import { Meta } from '@solidjs/meta' +import { Meta, Title } from '@solidjs/meta' import { clsx } from 'clsx' -import { Show, createMemo, createSignal, Switch, onMount, For, Match, createEffect, on } from 'solid-js' +import { Show, createMemo, createSignal, Switch, onMount, For, Match, createEffect } from 'solid-js' import { useFollowing } from '../../../context/following' import { useLocalize } from '../../../context/localize' import { apiClient } from '../../../graphql/client/core' import { router, useRouter } from '../../../stores/router' -import { loadShouts, useArticlesStore } from '../../../stores/zine/articles' +import { loadMyFeed, loadShouts, useArticlesStore } from '../../../stores/zine/articles' import { loadAuthor, useAuthorsStore } from '../../../stores/zine/authors' import { getImageUrl } from '../../../utils/getImageUrl' import { getDescription } from '../../../utils/meta' @@ -45,6 +45,7 @@ export const AuthorView = (props: Props) => { const [followers, setFollowers] = createSignal([]) const [following, setFollowing] = createSignal>([]) const [showExpandBioControl, setShowExpandBioControl] = createSignal(false) + const [commented, setCommented] = createSignal() // current author const [author, setAuthor] = createSignal() @@ -125,13 +126,12 @@ export const AuthorView = (props: Props) => { const fetchComments = async (commenter: Author) => { const data = await apiClient.getReactionsBy({ - by: { comment: true, created_by: commenter.id }, + by: { comment: false, created_by: commenter.id }, }) console.debug(`[components.Author] fetched ${data.length} comments`) setCommented(data) } - const [commented, setCommented] = createSignal([]) createEffect(() => { const a = author() if (a) { @@ -149,6 +149,7 @@ export const AuthorView = (props: Props) => { return (
+ {author().name} diff --git a/src/pages/author.page.tsx b/src/pages/author.page.tsx index 6b06342b..3a357acb 100644 --- a/src/pages/author.page.tsx +++ b/src/pages/author.page.tsx @@ -5,12 +5,14 @@ import { createEffect, createMemo, createSignal, on, onCleanup, onMount, Show } import { Loading } from '../components/_shared/Loading' import { PageLayout } from '../components/_shared/PageLayout' import { AuthorView, PRERENDERED_ARTICLES_COUNT } from '../components/Views/Author' +import { useLocalize } from '../context/localize' import { ReactionsProvider } from '../context/reactions' import { useRouter } from '../stores/router' import { loadShouts, resetSortedArticles } from '../stores/zine/articles' import { loadAuthor } from '../stores/zine/authors' export const AuthorPage = (props: PageProps) => { + const { t } = useLocalize() const { page } = useRouter() const slug = createMemo(() => page().params['slug'] as string) @@ -57,7 +59,7 @@ export const AuthorPage = (props: PageProps) => { const usePrerenderedData = props.author?.slug === slug() return ( - + }>