import { Component, type ReactNode } from "react"; interface GraphErrorBoundaryProps { children: ReactNode; } interface GraphErrorBoundaryState { hasError: boolean; } export class GraphErrorBoundary extends Component< GraphErrorBoundaryProps, GraphErrorBoundaryState > { public state: GraphErrorBoundaryState = { hasError: false }; public static getDerivedStateFromError(): GraphErrorBoundaryState { return { hasError: true }; } public render(): ReactNode { if (this.state.hasError) { return (
The interactive graph could not be rendered. Your extraction remains available; try another result or reload the page.
); } return this.props.children; } }