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 () => {
try {
const slug = author()?.slug
const [getAuthors, getTopics] = await Promise.all([
apiClient.getAuthorFollowingAuthors({ slug }),
apiClient.getAuthorFollowingTopics({ slug }),
])
setFollowing([...getAuthors, ...getTopics])
setFiltered([...getAuthors, ...getTopics])
const authorFollows = await apiClient.getAuthorFollows({ slug })
setFollowing([...authorFollows['authors']])
setFiltered([...authorFollows['authors'], ...authorFollows['topics']])
} catch (error) {
console.error('[fetchSubscriptions] :', error)
throw error

View File

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