Files
Sankofa/portal/src/app/error.tsx
defiQUG 9daf1fd378 Apply Composer changes: comprehensive API updates, migrations, middleware, and infrastructure improvements
- Add comprehensive database migrations (001-024) for schema evolution
- Enhance API schema with expanded type definitions and resolvers
- Add new middleware: audit logging, rate limiting, MFA enforcement, security, tenant auth
- Implement new services: AI optimization, billing, blockchain, compliance, marketplace
- Add adapter layer for cloud integrations (Cloudflare, Kubernetes, Proxmox, storage)
- Update Crossplane provider with enhanced VM management capabilities
- Add comprehensive test suite for API endpoints and services
- Update frontend components with improved GraphQL subscriptions and real-time updates
- Enhance security configurations and headers (CSP, CORS, etc.)
- Update documentation and configuration files
- Add new CI/CD workflows and validation scripts
- Implement design system improvements and UI enhancements
2025-12-12 18:01:35 -08:00

51 lines
1.5 KiB
TypeScript

'use client'
import { useEffect } from 'react'
import Link from 'next/link'
import { Home, RefreshCw, AlertCircle } from 'lucide-react'
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string }
reset: () => void
}) {
useEffect(() => {
// Log error to error reporting service
console.error('Application error:', error)
}, [error])
return (
<div className="flex min-h-screen items-center justify-center bg-gray-900">
<div className="text-center max-w-md mx-auto p-8">
<AlertCircle className="h-16 w-16 text-red-500 mx-auto mb-4" />
<h1 className="text-3xl font-bold text-white mb-4">Something went wrong!</h1>
<p className="text-gray-400 mb-2">
An unexpected error occurred. Please try again.
</p>
{error.digest && (
<p className="text-sm text-gray-500 mb-8">Error ID: {error.digest}</p>
)}
<div className="flex gap-4 justify-center">
<button
onClick={reset}
className="flex items-center gap-2 px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
>
<RefreshCw className="h-5 w-5" />
Try Again
</button>
<Link
href="/"
className="flex items-center gap-2 px-6 py-3 bg-gray-600 text-white rounded-lg hover:bg-gray-700 transition-colors"
>
<Home className="h-5 w-5" />
Go Home
</Link>
</div>
</div>
</div>
)
}