Configuración inicial del proyecto: estructura de directorios y dependencias mínimas instaladas

This commit is contained in:
manu
2025-12-05 09:36:39 -05:00
commit 002c79abcb
60 changed files with 11057 additions and 0 deletions

45
app/global-error.tsx Normal file
View File

@@ -0,0 +1,45 @@
'use client'
import { useEffect } from 'react';
export default function GlobalError({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
// Log error to monitoring service (Sentry, etc.)
console.error('Global error:', error);
}, [error]);
return (
<html>
<body>
<div className="flex min-h-screen flex-col items-center justify-center p-4 bg-background">
<div className="text-center space-y-4 max-w-md">
<h2 className="text-2xl font-bold text-turo-primary">
Error Crítico
</h2>
<p className="text-muted-foreground">
{error.message || 'Ocurrió un error crítico en la aplicación'}
</p>
{error.digest && (
<p className="text-sm text-muted-foreground">
Error ID: {error.digest}
</p>
)}
<button
onClick={reset}
className="px-4 py-2 bg-turo-accent text-white rounded-lg hover:bg-turo-accent-hover transition-colors"
>
Reintentar
</button>
</div>
</div>
</body>
</html>
);
}