From 31cc5ecdb693be1da04ee0a3e6dc876535d5fb4b Mon Sep 17 00:00:00 2001
From: HombreLaser <sebastian-440@live.com>
Date: Sun, 23 Apr 2023 13:12:25 -0600
Subject: Añade loader
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

(limited to 'src/main.tsx')

diff --git a/src/main.tsx b/src/main.tsx
index 891dd4b..af84886 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -3,11 +3,15 @@ import ReactDOM from 'react-dom/client'
 import { createBrowserRouter, Navigate, RouterProvider } from 'react-router-dom'
 import Products from "./routes/products/products";
 import Layout from "./components/layout";
+import loader from "./clients/loader"; 
 import './index.css'
 
 const routes = [
   {
     path: '/products',
+    loader: async({ params }) => {
+      return loader("/products", params);
+    },
     element: <Products/>
   },
   {
-- 
cgit v1.2.3

