import { Component, ReactNode } from "react"; import { Card, Text } from "@mantine/core"; import { Trans } from "@lingui/react/macro"; interface QuietBoundaryProps { children: ReactNode; } interface QuietBoundaryState { hasError: boolean; } export class QuietBoundary extends Component { state: QuietBoundaryState = { hasError: false }; static getDerivedStateFromError(): QuietBoundaryState { return { hasError: true }; } render() { if (this.state.hasError) { return ( Unavailable right now ); } return this.props.children; } } export default QuietBoundary;