feat: add reviews, notifications, notes and account hardening
All checks were successful
CI / Validate frontend and API (push) Successful in 59s
CI / Build and publish Docker images (push) Successful in 23s

This commit is contained in:
Cauê Faleiros
2026-11-05 17:27:36 -03:00
parent 21085e887d
commit fff63f5efa
32 changed files with 1109 additions and 84 deletions

View File

@@ -0,0 +1,31 @@
import React, { ReactNode } from 'react';
interface ErrorBoundaryState {
hasError: boolean;
}
export class ErrorBoundary extends React.Component<{ children: ReactNode }, ErrorBoundaryState> {
declare props: Readonly<{ children: ReactNode }>;
state: ErrorBoundaryState = { hasError: false };
static getDerivedStateFromError(): ErrorBoundaryState {
return { hasError: true };
}
componentDidCatch(error: Error, info: React.ErrorInfo) {
console.error('Unhandled application error', error, info);
}
render() {
if (this.state.hasError) {
return <main className="wrap page">
<div className="empty">
<h1>Algo deu errado</h1>
<p>Não foi possível exibir esta página. Recarregue para tentar novamente.</p>
<button className="btn" type="button" onClick={() => window.location.reload()} style={{ marginTop: 20 }}>Recarregar página</button>
</div>
</main>;
}
return this.props.children;
}
}