From dbe244b32f5826ba34238bcb842de547656db1e8 Mon Sep 17 00:00:00 2001 From: Binh Date: Mon, 21 Sep 2026 10:05:09 +0200 Subject: [PATCH] fix: preserve contracts after Michael rebase --- src/components/FindingCard/FindingCard.tsx | 9 +-------- src/features/dataset-viewer/DatasetViewer.tsx | 16 +++++++++------- src/features/results-browser/ResultsBrowser.tsx | 4 ++-- .../defender-for-iot-definition.ts | 16 ++++++++++++++++ src/profiles/profile-factory.ts | 4 +--- .../datahub-processing-readiness.test.ts | 2 +- 6 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/components/FindingCard/FindingCard.tsx b/src/components/FindingCard/FindingCard.tsx index da3dccc..cd572e1 100644 --- a/src/components/FindingCard/FindingCard.tsx +++ b/src/components/FindingCard/FindingCard.tsx @@ -1,4 +1,4 @@ -import { memo, useEffect, useRef } from 'react'; +import { memo } from 'react'; import type { FindingRecord } from '../../domain/finding'; import { normalizeSeverity } from '../../profiles/purple-knight/presentation'; import { toolIdForRecord } from '../../importers/status-normalization'; @@ -27,15 +27,8 @@ function FindingCardComponent({ record, title, bookmarked, selected, toolId, sea const outcomeMark = findingOutcomeMark(record, toolId); const resolvedToolId = toolIdForRecord(record, toolId); const diagnostics = policyDiagnosticBadges(record, resolvedToolId); - const cardRef = useRef(null); - - useEffect(() => { - if (!selected) return; - cardRef.current?.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'smooth' }); - }, [selected]); return (