fix: corregir orden de providers en App.tsx
- Mover ErrorBoundary al nivel más externo - Corregir orden de cierre de tags JSX - Build ahora exitoso sin errores de sintaxis
This commit is contained in:
parent
d9cf9f282a
commit
1b2d3af2ff
12
src/App.tsx
12
src/App.tsx
|
|
@ -52,9 +52,9 @@ const App = () => {
|
|||
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem>
|
||||
<ErrorBoundary>
|
||||
<ErrorBoundary>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem>
|
||||
<TooltipProvider>
|
||||
<Toaster />
|
||||
<Sonner />
|
||||
|
|
@ -120,9 +120,9 @@ const App = () => {
|
|||
</div>
|
||||
</BrowserRouter>
|
||||
</TooltipProvider>
|
||||
</ErrorBoundary>
|
||||
</ThemeProvider>
|
||||
</QueryClientProvider>
|
||||
</ThemeProvider>
|
||||
</QueryClientProvider>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -85,12 +85,16 @@ class ErrorBoundary extends Component<Props, State> {
|
|||
<RefreshCw className="w-4 h-4 mr-2" />
|
||||
Intentar de nuevo
|
||||
</Button>
|
||||
<Link to="/">
|
||||
<Button variant="outline" className="w-full">
|
||||
<Home className="w-4 h-4 mr-2" />
|
||||
Ir al inicio
|
||||
</Button>
|
||||
</Link>
|
||||
<Button
|
||||
variant="outline"
|
||||
className="w-full"
|
||||
onClick={() => {
|
||||
window.location.href = '/';
|
||||
}}
|
||||
>
|
||||
<Home className="w-4 h-4 mr-2" />
|
||||
Ir al inicio
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -88,9 +88,10 @@ const MenuSheet = memo(({ isOpen, onClose }: MenuSheetProps) => {
|
|||
|
||||
<div className="p-4 space-y-2">
|
||||
{menuItems.map((item, index) => {
|
||||
const Icon = item.icon;
|
||||
const content = (
|
||||
<>
|
||||
<span className="text-muted-foreground">{item.icon}</span>
|
||||
<span className="text-muted-foreground"><Icon className="w-5 h-5" /></span>
|
||||
<span className="font-medium text-foreground">{item.label}</span>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue