import { childLogger } from "document-drive";
import { Component } from "react";
const logger = childLogger(["Connect", "Modals"]);
export class ModalErrorBoundary extends Component {
    constructor(props) {
        super(props);
        this.state = { hasError: false };
    }
    static getDerivedStateFromError() {
        return { hasError: true };
    }
    componentDidCatch(error, errorInfo) {
        logger.error(error, errorInfo);
    }
    render() {
        if (this.state.hasError) {
            return null;
        }
        return this.props.children;
    }
}
//# sourceMappingURL=modals-error-boundary.js.map