tsc-passed

This commit is contained in:
Untone 2024-02-21 14:43:04 +03:00
parent acbe96a830
commit 7af3f1d405
2 changed files with 3 additions and 7 deletions

View File

@ -29,12 +29,9 @@ export const ProfileSubscriptions = () => {
const fetchSubscriptions = async () => { const fetchSubscriptions = async () => {
try { try {
const slug = author()?.slug const slug = author()?.slug
const [getAuthors, getTopics] = await Promise.all([ const authorFollows = await apiClient.getAuthorFollows({ slug })
apiClient.getAuthorFollowingAuthors({ slug }), setFollowing([...authorFollows['authors']])
apiClient.getAuthorFollowingTopics({ slug }), setFiltered([...authorFollows['authors'], ...authorFollows['topics']])
])
setFollowing([...getAuthors, ...getTopics])
setFiltered([...getAuthors, ...getTopics])
} catch (error) { } catch (error) {
console.error('[fetchSubscriptions] :', error) console.error('[fetchSubscriptions] :', error)
throw error throw error

View File

@ -26,7 +26,6 @@ export function useFollowing() {
const EMPTY_SUBSCRIPTIONS: AuthorFollows = { const EMPTY_SUBSCRIPTIONS: AuthorFollows = {
topics: [], topics: [],
authors: [], authors: [],
shouts: [],
communities: [], communities: [],
} }