diff --git a/frontend/src/components/common/ErrorBoundary.tsx b/frontend/src/components/common/ErrorBoundary.tsx deleted file mode 100644 index 44df331..0000000 --- a/frontend/src/components/common/ErrorBoundary.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import React from 'react'; - -interface ErrorBoundaryState { - hasError: boolean; -} - -/** - * Last line of defence: a render crash shows a recovery screen instead of a - * blank page, so a user never loses sight of their work without an explanation. - */ -class ErrorBoundary extends React.Component<{ children: React.ReactNode }, ErrorBoundaryState> { - state: ErrorBoundaryState = { hasError: false }; - - static getDerivedStateFromError(): ErrorBoundaryState { - return { hasError: true }; - } - - componentDidCatch(error: Error, info: React.ErrorInfo): void { - // Kept in the console for now; a real logging endpoint is a Backend concern. - console.error('TaskFlow crashed while rendering', error, info.componentStack); - } - - render(): React.ReactNode { - if (this.state.hasError) { - return ( -
Nothing was lost. Reload the page to pick up where you left off.
- -