mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 13:11:16 -05:00
Reverted to commit 06ed528d76
This commit is contained in:
@@ -39,6 +39,12 @@ interface ModerationItem {
|
||||
assigned_to?: string;
|
||||
locked_until?: string;
|
||||
_removing?: boolean;
|
||||
submission_items?: Array<{
|
||||
id: string;
|
||||
item_type: string;
|
||||
item_data: any;
|
||||
status: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
import { ValidationSummary } from './ValidationSummary';
|
||||
@@ -168,12 +174,12 @@ export const QueueItem = memo(({
|
||||
Claimed by You
|
||||
</Badge>
|
||||
)}
|
||||
{item.submission_type && (
|
||||
{item.submission_items && item.submission_items.length > 0 && (
|
||||
<ValidationSummary
|
||||
item={{
|
||||
item_type: item.submission_type,
|
||||
item_data: item.content,
|
||||
id: item.id,
|
||||
item_type: item.submission_items[0].item_type,
|
||||
item_data: item.submission_items[0].item_data,
|
||||
id: item.submission_items[0].id,
|
||||
}}
|
||||
compact={true}
|
||||
onValidationChange={handleValidationChange}
|
||||
@@ -662,16 +668,16 @@ export const QueueItem = memo(({
|
||||
const nextLocked = nextProps.lockedSubmissions.has(nextProps.item.id);
|
||||
if (prevLocked !== nextLocked) return false;
|
||||
|
||||
// Deep comparison of content and other fields that affect rendering
|
||||
// Deep comparison of critical fields (use strict equality for reference stability)
|
||||
if (prevProps.item.status !== nextProps.item.status) return false;
|
||||
if (prevProps.item.reviewed_at !== nextProps.item.reviewed_at) return false;
|
||||
if (prevProps.item.reviewed_by !== nextProps.item.reviewed_by) return false;
|
||||
if (prevProps.item.reviewer_notes !== nextProps.item.reviewer_notes) return false;
|
||||
if (prevProps.item.assigned_to !== nextProps.item.assigned_to) return false;
|
||||
if (prevProps.item.locked_until !== nextProps.item.locked_until) return false;
|
||||
if (prevProps.item.escalated !== nextProps.item.escalated) return false;
|
||||
|
||||
// Content comparison (most expensive, do last)
|
||||
if (JSON.stringify(prevProps.item.content) !== JSON.stringify(nextProps.item.content)) return false;
|
||||
// Only check content reference, not deep equality (performance)
|
||||
if (prevProps.item.content !== nextProps.item.content) return false;
|
||||
|
||||
// All checks passed - items are identical
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user