fix(mod queue): button counter doesn't update when navigating between boards

This commit is contained in:
plebeius
2026-01-11 17:23:29 +01:00
parent 75afd34c6c
commit ca53fb4728
+3 -1
View File
@@ -404,7 +404,9 @@ export const ModQueueButton = ({ boardIdentifier, isMobile }: ModQueueButtonProp
}
const alertThresholdSeconds = getAlertThresholdSeconds();
return <ModQueueButtonContent feed={feed} alertThresholdSeconds={alertThresholdSeconds} boardIdentifier={boardIdentifier} isMobile={isMobile} />;
// Use key to reset statusMap state when switching boards (prevents stale counts from previous board)
const contentKey = subplebbitAddresses.join(',');
return <ModQueueButtonContent key={contentKey} feed={feed} alertThresholdSeconds={alertThresholdSeconds} boardIdentifier={boardIdentifier} isMobile={isMobile} />;
};
export const ModQueueView = ({ boardIdentifier: propBoardIdentifier }: ModQueueViewProps) => {