From b5885b23a8d3593428334683b8c03075ce071f3a Mon Sep 17 00:00:00 2001
From: HombreLaser <sebastian-440@live.com>
Date: Sun, 21 May 2023 12:26:29 -0600
Subject: Añade edición de método de pago
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

(limited to 'src/main.tsx')

diff --git a/src/main.tsx b/src/main.tsx
index f1020b1..404cc0f 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -7,11 +7,12 @@ import Companies from "./routes/companies/companies";
 import Account from "./routes/account/account";
 import { EditAccount } from './routes/account/edit';
 import { Edit as EditAddress } from "./routes/account/addresses/edit";
-import { createAddress, editAccount, editAddress } from './clients/actions';
+import { createAddress, editAccount, authenticatedEdit } from './clients/actions';
 import Layout from "./components/layout";
-import { accountLoader, loader, productLoader, addressLoader } from "./clients/loaders"; 
+import { accountLoader, loader, productLoader, addressLoader, cardLoader } from "./clients/loaders"; 
 import './index.css';
 import { Create as CreateAddress } from './routes/account/addresses/create';
+import { Edit as EditCard } from './routes/account/cards/edit';
 
 const routes = [
   {
@@ -44,13 +45,19 @@ const routes = [
     path: "/account/addresses/:addressId/edit",
     element: <EditAddress/>,
     loader: addressLoader,
-    action: editAddress,
+    action: authenticatedEdit,
   },
   {
     path: "/account/addresses/new",
     element: <CreateAddress/>,
     action: createAddress
   },
+  {
+    path: "/account/cards/:cardId/edit",
+    element: <EditCard/>,
+    loader: cardLoader,
+    action: authenticatedEdit
+  },
   {
     path: '/',
     element: <Navigate to='/products'/>
-- 
cgit v1.2.3

