postmerge-fix
This commit is contained in:
parent
e38d3b39b7
commit
23326b10f7
|
@ -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())
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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<SubscribeAction>()
|
||||
const follow = async (what: FollowingEntity, slug: string) => {
|
||||
if (!author()) return
|
||||
setSubscribeInAction({ slug, type: 'subscribe' })
|
||||
|
|
Loading…
Reference in New Issue
Block a user