Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
import type { SocialAccount } from '@/api/accounts/account.types'
import { PlatType } from '@/app/config/platConfig'
const temporaryUnavailableFansPlatforms = new Set<PlatType>([
PlatType.Douyin,
PlatType.WxGzh,
])
export function calcSocialAccountsTotalFans(accounts: Array<Pick<SocialAccount, 'fansCount'>>) {
return accounts.reduce((sum, account) => sum + (account.fansCount || 0), 0)
}
export function shouldShowFansSyncNotice(type: PlatType, fansCount: number | null | undefined) {
return temporaryUnavailableFansPlatforms.has(type) && fansCount === 0
}