"use client"; import { IssueGraph } from "@/components/issues/issue-graph"; import { IssuesLoadError } from "@/components/issues/issues-load-error"; import { useIssueEvidence } from "@/hooks/use-issue-evidence"; import { IssueAttributes } from "@/types/issues"; interface IssueAttackPathProps { id: string; issue: IssueAttributes; scanId?: string; providerId?: string; } /** The issue's graph for the side panel; findings open on the full page. */ export const IssueAttackPath = ({ id, issue, scanId, providerId, }: IssueAttackPathProps) => { const { state, retry } = useIssueEvidence(id, scanId, providerId); if (state.status === "loading") { return (

Loading the attack path…

); } // Nothing to draw beats a findings error: without resources there is no // graph for the findings to land on. if (state.status === "loaded" && state.resources.length === 0) { return (

This issue has no affected resources to draw.

); } if (state.status === "error" || state.findings === undefined) { return ( ); } return ( ); };