tsc-passed
This commit is contained in:
parent
acbe96a830
commit
7af3f1d405
|
@ -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
|
||||||
|
|
|
@ -26,7 +26,6 @@ export function useFollowing() {
|
||||||
const EMPTY_SUBSCRIPTIONS: AuthorFollows = {
|
const EMPTY_SUBSCRIPTIONS: AuthorFollows = {
|
||||||
topics: [],
|
topics: [],
|
||||||
authors: [],
|
authors: [],
|
||||||
shouts: [],
|
|
||||||
communities: [],
|
communities: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user