From a417af928cd42e8a6749d69ac661182b3e1249a8 Mon Sep 17 00:00:00 2001
From: HombreLaser <sebastian-440@live.com>
Date: Fri, 21 Apr 2023 21:25:01 -0600
Subject: Añade organización general de la página
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/main.tsx | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

(limited to 'src/main.tsx')

diff --git a/src/main.tsx b/src/main.tsx
index 91c03f3..891dd4b 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,10 +1,27 @@
 import React from 'react'
 import ReactDOM from 'react-dom/client'
-import App from './App.tsx'
+import { createBrowserRouter, Navigate, RouterProvider } from 'react-router-dom'
+import Products from "./routes/products/products";
+import Layout from "./components/layout";
 import './index.css'
 
+const routes = [
+  {
+    path: '/products',
+    element: <Products/>
+  },
+  {
+    path: '/',
+    element: <Navigate to='/products'/>
+  }
+];
+
+const router = createBrowserRouter(routes);
+
 ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
   <React.StrictMode>
-    <App />
-  </React.StrictMode>,
-)
+    <Layout>
+      <RouterProvider router={router}/>
+    </Layout>
+  </React.StrictMode>
+)
\ No newline at end of file
-- 
cgit v1.2.3

