klg-asutk-app/app/global-error.tsx
Yuriy 0150aba4f5 Consolidation: KLG ASUTK + PAPA integration
- Unify API: lib/api.ts uses /api/v1, inbox uses /api/inbox (rewrites)
- Remove localhost refs: openapi, inbox page
- Add rewrites: /api/inbox|tmc -> inbox-server, /api/v1 -> FastAPI
- Add stub routes: knowledge/insights, recommendations, search, log-error
- Transfer from PAPA: prompts (inspection, tmc), scripts, supabase, data/tmc-requests
- Fix inbox-server: ORDER BY created_at, package.json
- Remove redundant app/api/inbox/files route (rewrites handle it)
- knowledge/ in gitignore (large PDFs)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 17:18:31 +03:00

78 lines
2.0 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* Глобальный обработчик ошибок для корневого layout
*/
'use client';
export default function GlobalError({
error: _error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
return (
<html lang="ru">
<body>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
minHeight: '100vh',
padding: '40px',
backgroundColor: '#f5f5f5',
}}
>
<div
style={{
maxWidth: '600px',
backgroundColor: 'white',
padding: '32px',
borderRadius: '8px',
boxShadow: '0 4px 6px rgba(0,0,0,0.1)',
textAlign: 'center',
}}
>
<div style={{ fontSize: '48px', marginBottom: '16px' }}></div>
<h2
style={{
fontSize: '24px',
fontWeight: 'bold',
marginBottom: '12px',
color: '#333',
}}
>
Критическая ошибка
</h2>
<p
style={{
fontSize: '16px',
color: '#666',
marginBottom: '24px',
lineHeight: '1.5',
}}
>
Произошла критическая ошибка приложения. Пожалуйста, обновите страницу.
</p>
<button
onClick={reset}
style={{
padding: '12px 24px',
backgroundColor: '#1e3a5f',
color: 'white',
border: 'none',
borderRadius: '4px',
cursor: 'pointer',
fontSize: '14px',
fontWeight: '500',
}}
>
Обновить страницу
</button>
</div>
</div>
</body>
</html>
);
}