From c7e493ce3d2855e61787d86714625bc7fc51f9bd Mon Sep 17 00:00:00 2001
From: HombreLaser <sebastian-440@live.com>
Date: Wed, 26 Apr 2023 21:37:38 -0600
Subject: Añade vista de producto individual
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/main.tsx | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'src/main.tsx')

diff --git a/src/main.tsx b/src/main.tsx
index 7d0af9a..45f5fd6 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -2,16 +2,22 @@ import React from 'react'
 import ReactDOM from 'react-dom/client'
 import { createBrowserRouter, Navigate, RouterProvider } from 'react-router-dom'
 import Products from "./routes/products/products";
+import Product from "./routes/products/product";
 import Layout from "./components/layout";
-import productLoader from "./clients/loader"; 
-import './index.css'
+import { loader, productLoader } from "./clients/loaders"; 
+import './index.css';
 
 const routes = [
   {
     path: '/products',
-    loader: productLoader,
+    loader: loader,
     element: <Products/>
   },
+  {
+    path: "products/:productId",
+    loader: productLoader,
+    element: <Product/>
+  },
   {
     path: '/',
     element: <Navigate to='/products'/>
-- 
cgit v1.2.3

