feat(sns): limit right contacts to covered users

This commit is contained in:
tisonhuang committed 2026-03-04 21:19:10 +08:00
1 parent 36ec12fd0f
commit c6c7f128a9
2 files changed
+41 -13

No files matched your search

+11 -1
View File
@@ -69,6 +69,16 @@ export const SnsFilterPanel: React.FC<SnsFilterPanelProps> = ({
return { text: `${Math.max(0, Number(contact.postCount || 0))} 条`, className: '' }
}
const getEmptyStateText = () => {
if (loading && contacts.length === 0) {
return '正在加载联系人...'
}
if (contacts.length === 0) {
return '有朋友圈数据的好友或者曾经的好友数量为 0'
}
return '没有找到联系人'
}
return (
<aside className="sns-filter-panel">
<div className="filter-header">
@@ -172,7 +182,7 @@ export const SnsFilterPanel: React.FC<SnsFilterPanelProps> = ({
)
})}
{filteredContacts.length === 0 && (
<div className="empty-state">没有找到联系人</div>
<div className="empty-state">{getEmptyStateText()}</div>
)}
</div>
</div>