fix(monitor): 组头取账号指标时,别被组里第一条作品带偏
分组只按博主,而账号指标是挂在 (任务, 博主) 上的 —— 同一个博主被两个任务 监控时,组里可能只有一部分作品带指标。取第一条的话,「第一个任务还没采过」 就会让整组看起来没有指标。
This commit is contained in:
@@ -268,8 +268,15 @@ export function NotesTable({ taskId, onlyNew }: NotesTableProps) {
|
||||
<span className="text-cyber-text-muted flex-shrink-0">
|
||||
{group.notes.length} 篇
|
||||
</span>
|
||||
{/* 账号级指标对组里每条作品都一样,取第一条即可。 */}
|
||||
<CreatorStats note={group.notes[0]} />
|
||||
{/* 账号级指标是按 (任务, 博主) 存的,而分组只按博主 —— 同一个博主
|
||||
被两个任务监控时,组里可能只有一部分作品带指标。优先挑带指标的那条,
|
||||
否则「第一个任务还没采过」会让整组看起来没有指标。 */}
|
||||
<CreatorStats
|
||||
note={
|
||||
group.notes.find((note) => note.creator_stats_at !== null) ??
|
||||
group.notes[0]
|
||||
}
|
||||
/>
|
||||
<button
|
||||
onClick={(event) => {
|
||||
event.stopPropagation()
|
||||
|
||||
Reference in New Issue
Block a user