From 67f98c1f66b9695f55992ff4dd7f24f1cb08169a Mon Sep 17 00:00:00 2001 From: BOHA Date: Sun, 7 Jun 2026 08:37:19 +0200 Subject: [PATCH] feat(mui): migrate ErrorBoundary off admin-* CSS Class component lifecycle (getDerivedStateFromError, componentDidCatch, console.error, state shape) preserved verbatim. Only the fallback render is re-skinned: Box+Typography for layout/text, kit Button for the reload action. Czech strings unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/admin/components/ErrorBoundary.tsx | 31 +++++++++++++++++--------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/admin/components/ErrorBoundary.tsx b/src/admin/components/ErrorBoundary.tsx index 3b70168..3eaaebb 100644 --- a/src/admin/components/ErrorBoundary.tsx +++ b/src/admin/components/ErrorBoundary.tsx @@ -1,4 +1,7 @@ import { Component, type ReactNode, type ErrorInfo } from "react"; +import Box from "@mui/material/Box"; +import Typography from "@mui/material/Typography"; +import { Button } from "../ui"; interface Props { children: ReactNode; @@ -22,19 +25,25 @@ export default class ErrorBoundary extends Component { render() { if (this.state.hasError) { return ( -
-

Něco se pokazilo

-

{this.state.error?.message}

- -
+ + ); } return this.props.children;