Skip to content

Commit 700afcb

Browse files
committed
corrección codigo final
1 parent c25ae28 commit 700afcb

4 files changed

Lines changed: 7 additions & 12 deletions

File tree

src/components/Navbar.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { Link } from "react-router-dom";
22
import starWarsLogo from "../assets/img/iconosw.png";
33
import { Favorites } from "./Favorites";
44

5-
// ... el resto del componente
6-
75

86
export const Navbar = () => {
97
return (

src/main.jsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
import React from "react";
22
import ReactDOM from "react-dom/client";
3-
import "./index.css"; // Global styles for your application
4-
import { RouterProvider } from "react-router-dom"; // Import RouterProvider to use the router
5-
import { router } from "./routes"; // Import the router configuration
6-
import { StoreProvider } from "./hooks/useGlobalReducer"; // Import the StoreProvider for global state management
7-
3+
import "./index.css";
4+
import { RouterProvider } from "react-router-dom";
5+
import { router } from "./routes";
6+
import { StoreProvider } from "./hooks/useGlobalReducer";
87
const Main = () => {
98
return (
109
<React.StrictMode>
11-
{/* Provide global state to all components */}
1210
<StoreProvider>
13-
{/* Set up routing for the application */}
1411
<RouterProvider router={router}></RouterProvider>
1512
</StoreProvider>
1613
</React.StrictMode>
1714
);
1815
};
1916

20-
// Render the Main component into the root DOM element.
17+
2118
ReactDOM.createRoot(document.getElementById("root")).render(<Main />);

src/pages/Layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Outlet } from "react-router-dom";
22
import ScrollToTop from "../components/ScrollToTop";
33
import { Navbar } from "../components/Navbar";
4-
import { Footer } from "../components/Footer";
4+
55

66

77
export const Layout = () => {

src/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ export default function storeReducer(store, action = {}) {
4343
return { ...store, vehicleList: action.payload };
4444

4545
default:
46-
return store; // 🔑 NUNCA lanzar error aquí
46+
return store;
4747
}
4848
}

0 commit comments

Comments
 (0)