mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 12:11:13 -05:00
Fix edge function console statements
This commit is contained in:
@@ -11,9 +11,11 @@ interface AdminErrorBoundaryProps {
|
||||
section?: string; // e.g., "Moderation", "Users", "Settings"
|
||||
}
|
||||
|
||||
type ErrorWithId = Error & { errorId: string };
|
||||
|
||||
interface AdminErrorBoundaryState {
|
||||
hasError: boolean;
|
||||
error: Error | null;
|
||||
error: ErrorWithId | null;
|
||||
errorInfo: ErrorInfo | null;
|
||||
}
|
||||
|
||||
@@ -43,7 +45,7 @@ export class AdminErrorBoundary extends Component<AdminErrorBoundaryProps, Admin
|
||||
static getDerivedStateFromError(error: Error): Partial<AdminErrorBoundaryState> {
|
||||
return {
|
||||
hasError: true,
|
||||
error,
|
||||
error: error as ErrorWithId,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -60,7 +62,7 @@ export class AdminErrorBoundary extends Component<AdminErrorBoundaryProps, Admin
|
||||
errorId,
|
||||
});
|
||||
|
||||
this.setState({ errorInfo, error: { ...error, errorId } as any });
|
||||
this.setState({ errorInfo, error: { ...error, errorId } as ErrorWithId });
|
||||
}
|
||||
|
||||
handleRetry = () => {
|
||||
|
||||
Reference in New Issue
Block a user