Skip to content

Commit 4e77182

Browse files
committed
cleanup
1 parent dc7170c commit 4e77182

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

shared/src/types/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,6 @@ export interface LocalChange {
9494
export interface ResolutionMessage {
9595
type: string;
9696
solution: GetSolutionResult;
97-
violation: any;
98-
incident: any;
97+
violation: Violation;
98+
incident: Incident;
9999
}

webview-ui/src/components/IncidentList.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ interface IncidentListProps {
2020
onSelectIncident: (incident: Incident) => void;
2121
}
2222

23-
export function IncidentList({
23+
const IncidentList: React.FC<IncidentListProps> = ({
2424
incidents,
2525
selectedIncident,
2626
onSelectIncident,
27-
}: IncidentListProps) {
27+
}: IncidentListProps) => {
2828
const getSeverityColor = (severity: string = "low") => {
2929
switch (severity.toLowerCase()) {
3030
case "high":
@@ -93,4 +93,5 @@ export function IncidentList({
9393
))}
9494
</Stack>
9595
);
96-
}
96+
};
97+
export default IncidentList;

webview-ui/src/components/ResolutionsPage.tsx

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "./ResolutionsPage.css";
21
import React, { useEffect, useState } from "react";
32
import {
43
Page,
@@ -18,10 +17,10 @@ import {
1817
import { vscode } from "../utils/vscode";
1918
import { Change, ResolutionMessage } from "@shared/types";
2019
import { CheckCircleIcon, WarningTriangleIcon } from "@patternfly/react-icons";
21-
import { IncidentList } from "./IncidentList";
22-
import { CodePreview } from "./CodePreview";
23-
import { FileChanges } from "./FileChanges";
2420
import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";
21+
import IncidentList from "./IncidentList";
22+
import { FileChanges } from "./FileChanges";
23+
import { CodePreview } from "./CodePreview";
2524

2625
const ResolutionPage: React.FC = () => {
2726
const [resolution, setResolution] = useState<ResolutionMessage | null>(null);
@@ -141,15 +140,11 @@ const ResolutionPage: React.FC = () => {
141140
<CardTitle>
142141
{resolution?.violation.description || "No Violation Data"}
143142
<Badge className={spacing.mSm}>
144-
{/* {mockViolation.category} */}
145143
{resolution?.violation.category}
146144
</Badge>
147145
</CardTitle>
148146
<CardBody>
149147
<IncidentList
150-
// incidents={mockViolation.incidents}
151-
// selectedIncident={selectedIncident}
152-
// onSelectIncident={setSelectedIncident}
153148
incidents={resolution?.violation.incidents}
154149
selectedIncident={resolution?.incident}
155150
onSelectIncident={(incident) => {}}

0 commit comments

Comments
 (0)