From f216366ed45ff85ada9300a62afec13336d49b67 Mon Sep 17 00:00:00 2001 From: Square Date: Sat, 20 Jul 2024 17:34:15 +0530 Subject: [PATCH] Updated routes --- src/components/home/ProductCategoryCard.jsx | 2 +- src/components/nav/Nav.jsx | 12 ++++++------ src/components/products/ProductCard.jsx | 2 +- src/components/wishlist/WishlistItem.jsx | 4 ++-- src/main.jsx | 14 +++++++------- vite.config.js | 1 + 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/components/home/ProductCategoryCard.jsx b/src/components/home/ProductCategoryCard.jsx index c9f75e7..0d033d7 100644 --- a/src/components/home/ProductCategoryCard.jsx +++ b/src/components/home/ProductCategoryCard.jsx @@ -5,7 +5,7 @@ export default function ProductCategoryCard({ productName, productImg }) { return ( earphone diff --git a/src/components/nav/Nav.jsx b/src/components/nav/Nav.jsx index 7bba9f4..2953d05 100644 --- a/src/components/nav/Nav.jsx +++ b/src/components/nav/Nav.jsx @@ -10,23 +10,23 @@ export default function Nav() { const navigationLinks = [ { linkText: 'Products', - linkTo: '/products' + linkTo: '/E-Commerce/products' }, { linkText: 'Wishlist', - linkTo: '/wishlist' + linkTo: '/E-Commerce/wishlist' }, { linkText: 'MyCart', - linkTo: '/cart' + linkTo: '/E-Commerce/cart' }, { linkText: 'Account', - linkTo: '/account' + linkTo: '/E-Commerce/account' }, { - linkText: 'Logout', - linkTo: '/' + linkText: 'Login', + linkTo: '/E-Commerce.login' }, ]; diff --git a/src/components/products/ProductCard.jsx b/src/components/products/ProductCard.jsx index d09731d..40a7bda 100644 --- a/src/components/products/ProductCard.jsx +++ b/src/components/products/ProductCard.jsx @@ -64,7 +64,7 @@ export default function ProductCard({ productDetails }) { /> - +
diff --git a/src/components/wishlist/WishlistItem.jsx b/src/components/wishlist/WishlistItem.jsx index 8aacf74..0f54f19 100644 --- a/src/components/wishlist/WishlistItem.jsx +++ b/src/components/wishlist/WishlistItem.jsx @@ -36,7 +36,7 @@ export default function WishlistItem({ item }) { /> - + {itemName}
@@ -73,7 +73,7 @@ export default function WishlistItem({ item }) { {inCart ? ( Go to Cart diff --git a/src/main.jsx b/src/main.jsx index 2fcdb13..5d3a186 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -13,14 +13,14 @@ import Login from './components/login/Login.jsx'; const router = createBrowserRouter( createRoutesFromElements( - }> + }> } /> - } /> - } /> - } /> - } /> - } /> - } /> + } /> + } /> + } /> + } /> + } /> + } /> ) ); diff --git a/vite.config.js b/vite.config.js index 5a33944..8650886 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], + base: "/E-Commerce" })