From e8fa9bd7bba125a339f11876eb5ea99d0cd301b6 Mon Sep 17 00:00:00 2001
From: HombreLaser <sebastian-440@live.com>
Date: Thu, 25 May 2023 19:11:31 -0600
Subject: Añade historial de órdenes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

(limited to 'src/main.tsx')

diff --git a/src/main.tsx b/src/main.tsx
index 147d913..8f9c586 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -6,11 +6,12 @@ import Product from "./routes/products/product";
 import Companies from "./routes/companies/companies";
 import Account from "./routes/account/account";
 import Cart from "./routes/account/cart";
+import Orders from "./routes/account/orders";
 import { EditAccount } from './routes/account/edit';
 import { Edit as EditAddress } from "./routes/account/addresses/edit";
-import { create, editAccount, authenticatedEdit, addToCart, deleteFromCart } from './clients/actions';
+import { create, editAccount, authenticatedEdit, addToCart, deleteFromCart, placeOrder } from './clients/actions';
 import Layout from "./components/layout";
-import { accountLoader, loader, productLoader, addressLoader, cardLoader, cartLoader } from "./clients/loaders"; 
+import { accountLoader, loader, productLoader, addressLoader, cardLoader, cartLoader, ordersLoader } from "./clients/loaders"; 
 import './index.css';
 import { Create as CreateAddress } from './routes/account/addresses/create';
 import { Edit as EditCard } from './routes/account/cards/edit';
@@ -72,6 +73,12 @@ const routes = [
     loader: cartLoader,
     action: deleteFromCart
   },
+  {
+    path: "/account/orders",
+    element: <Orders/>,
+    loader: ordersLoader,
+    action: placeOrder
+  },
   {
     path: '/',
     element: <Navigate to='/products'/>
-- 
cgit v1.2.3

