fix: corregir errores de renderizado React y React Router

- Corregir MenuSheet: instanciar componentes Icon correctamente (<Icon /> en lugar de {icon})
- Mover ErrorBoundary fuera de BrowserRouter para evitar errores de contexto
- Eliminar Link de ErrorBoundary (usar window.location.href en su lugar)
- Cambiar process.env.NODE_ENV a import.meta.env.DEV en ErrorBoundary
- Los errores 'Objects are not valid as a React child' y 'basename is null' ahora resueltos
This commit is contained in:
planetazuzu 2025-12-23 10:20:44 +01:00
parent 9194f2a102
commit d9cf9f282a

View file

@ -67,7 +67,7 @@ class ErrorBoundary extends Component<Props, State> {
</p> </p>
</div> </div>
{process.env.NODE_ENV === 'development' && this.state.error && ( {import.meta.env.DEV && this.state.error && (
<div className="p-4 bg-muted border border-border rounded-lg"> <div className="p-4 bg-muted border border-border rounded-lg">
<p className="text-sm font-mono text-destructive mb-2"> <p className="text-sm font-mono text-destructive mb-2">
{this.state.error.toString()} {this.state.error.toString()}