From 23326b10f77403d956b28ca7cfa1b66b5029cdb4 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 25 Apr 2024 13:53:51 +0300 Subject: [PATCH] postmerge-fix --- src/components/Views/Author/Author.tsx | 4 ++-- src/context/following.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Views/Author/Author.tsx b/src/components/Views/Author/Author.tsx index df63b945..ca2cdd0c 100644 --- a/src/components/Views/Author/Author.tsx +++ b/src/components/Views/Author/Author.tsx @@ -75,7 +75,7 @@ export const AuthorView = (props: Props) => { const bioContainerRef: { current: HTMLDivElement } = { current: null } const bioWrapperRef: { current: HTMLDivElement } = { current: null } - const fetchData = async (author: Author) => { + const fetchData = async (slug: string) => { try { const [subscriptionsResult, followersResult, authorResult] = await Promise.all([ apiClient.getAuthorFollows({ slug }), @@ -134,7 +134,7 @@ export const AuthorView = (props: Props) => { createEffect(() => { if (author()) { - fetchData(author()) + fetchData(author().slug) fetchComments(author()) } }) diff --git a/src/context/following.tsx b/src/context/following.tsx index a6b07a03..8fd07cba 100644 --- a/src/context/following.tsx +++ b/src/context/following.tsx @@ -2,7 +2,7 @@ import { Accessor, JSX, createContext, createEffect, createMemo, createSignal, u import { createStore } from 'solid-js/store' import { apiClient } from '../graphql/client/core' -import { Author, AuthorFollowsResult, FollowingEntity } from '../graphql/schema/core.gen' +import { Author, AuthorFollowsResult, FollowingEntity, Community, Topic } from '../graphql/schema/core.gen' import { useSession } from './session' @@ -64,6 +64,7 @@ export const FollowingProvider = (props: { children: JSX.Element }) => { console.info('[context.following] subs:', subscriptions) }) + const [subscribeInAction, setSubscribeInAction] = createSignal() const follow = async (what: FollowingEntity, slug: string) => { if (!author()) return setSubscribeInAction({ slug, type: 'subscribe' })