Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
315 changes: 100 additions & 215 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,58 +1,62 @@
import React from "react";
import { Route, Routes, Navigate } from "react-router-dom";
import { AuthProvider } from "./context/AuthContext";
import { Helmet } from "react-helmet-async";

import Home from "./User/pages/Home";
import UserAuth from "./User/pages/UserAuth";
import Privacy from "./User/pages/Privacy-Policy";
import TermsAndConditions from "./User/pages/TermsAndCondition";


// User pages (FIXED IMPORTS)
import UserAuth from "./User/pages/UserAuth";
import AboutUs from "./User/pages/AboutUs";
import Contributors from "./User/pages/Contributors";
import Contact from "./User/pages/Contacts";
import Dashboard from "./User/pages/Dashboard";
import Home from "./User/pages/Home";
import Privacy from "./User/pages/Privacy-Policy";
import TermsAndConditions from "./User/pages/TermsAndCondition";
Comment on lines +6 to +20
Copy link
Contributor

@coderabbitai coderabbitai bot Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n src/App.jsx | head -50

Repository: codervivek5/VigyBag

Length of output: 2522


Deduplicate imports to avoid redeclaration errors.

UserAuth, Home, Privacy, and TermsAndConditions are imported twice (lines 6–9 and again at lines 13, 18–20). This is a redeclaration syntax error. Remove the first import block (lines 6–9) since the reorganized imports below the "FIXED IMPORTS" comment are the intended set.

🧹 Suggested fix
-import Home from "./User/pages/Home";
-import UserAuth from "./User/pages/UserAuth";
-import Privacy from "./User/pages/Privacy-Policy";
-import TermsAndConditions from "./User/pages/TermsAndCondition";
🧰 Tools
🪛 Biome (2.3.13)

[error] 13-13: Shouldn't redeclare 'UserAuth'. Consider to delete it or rename it.

'UserAuth' is defined here:

(lint/suspicious/noRedeclare)


[error] 18-18: Shouldn't redeclare 'Home'. Consider to delete it or rename it.

'Home' is defined here:

(lint/suspicious/noRedeclare)


[error] 19-19: Shouldn't redeclare 'Privacy'. Consider to delete it or rename it.

'Privacy' is defined here:

(lint/suspicious/noRedeclare)


[error] 20-20: Shouldn't redeclare 'TermsAndConditions'. Consider to delete it or rename it.

'TermsAndConditions' is defined here:

(lint/suspicious/noRedeclare)

🤖 Prompt for AI Agents
In `@src/App.jsx` around lines 6 - 20, There are duplicate import declarations for
UserAuth, Home, Privacy, and TermsAndConditions causing redeclaration errors;
remove the earlier duplicate import block that declares import Home, UserAuth,
Privacy, and TermsAndConditions and keep the consolidated "FIXED IMPORTS"
section (which already imports UserAuth, AboutUs, Contributors, Contact(s),
Dashboard, Home, Privacy, and TermsAndConditions) so each symbol (UserAuth,
Home, Privacy, TermsAndConditions) is imported only once.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look at this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codervivek5, the CodeRabbit bot correctly identified a critical issue with duplicate imports in your src/App.jsx file.

The Problem:
You have four components imported twice:

  • UserAuth - imported at line 7 and again at line 13
  • Home - imported at line 6 and again at line 18
  • Privacy - imported at line 8 and again at line 19
  • TermsAndConditions - imported at line 9 and again at line 20

The Fix:
Remove lines 6-9 (the first import block):

-import Home from "./User/pages/Home";
-import UserAuth from "./User/pages/UserAuth";
-import Privacy from "./User/pages/Privacy-Policy";
-import TermsAndConditions from "./User/pages/TermsAndCondition";

Keep the "FIXED IMPORTS" section below, which already includes these components. This will eliminate the redeclaration errors and allow your code to compile successfully.

import Help from "./User/pages/Help";
import MeetTheMakers from "./User/pages/MeetTheMakers";
import FAQ from "./User/pages/FAQ";
import CareerPage from "./User/pages/Career-Page";
import ServicePage from "./User/pages/Service-Page";
import Shipping from "./User/pages/Shipping";
import GiftCard from "./User/pages/Gift-Card";
import Payment_Policy from "./User/pages/Payment-Policy";
import Certification from "./User/pages/Certification";
import ReturnAndCancellation from "./User/pages/ReturnAndCancellation";
import EPR_Page from "./User/pages/EPRPage";

// User components
import UserAuth from "./User/pages/UserAuth/UserAuth";
import AboutUs from "./User/pages/AboutUs/Aboutus.jsx";
import Contributors from "./User/pages/Contributors/Contributors.jsx";
import Contact from "./User/pages/Contacts/Contact";
import Dashboard from "./User/pages/Dashboard/Dashboard";
import Home from "./User/pages/Home/Home";
// Layouts & shared
import UserLayout from "./User/UserLayout";
import Team from "./User/components/Team/Team";
import Confirmation from "./User/pages/Confirmation/Confirmation";
import Cancellation from "./User/pages/Cancellation/Cancellation";
import Error from "./User/pages/404-Page/Error";
Copy link
Contributor

@coderabbitai coderabbitai bot Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's check the App.jsx file structure and size
wc -l src/App.jsx

Repository: codervivek5/VigyBag

Length of output: 78


🏁 Script executed:

# Read the relevant sections around line 36 and 161
cat -n src/App.jsx | sed -n '30,42p'

Repository: codervivek5/VigyBag

Length of output: 650


🏁 Script executed:

# Read around line 161
cat -n src/App.jsx | sed -n '155,167p'

Repository: codervivek5/VigyBag

Length of output: 657


🏁 Script executed:

# Check for Biome configuration
fd -type f \( -name "biome.json" -o -name ".biomerc*" -o -name "biome.toml" \)

Repository: codervivek5/VigyBag

Length of output: 233


🏁 Script executed:

# Search for all Error usages in App.jsx
rg "Error" src/App.jsx -n

Repository: codervivek5/VigyBag

Length of output: 167


🏁 Script executed:

# Search for Biome configuration files with correct approach
find . -maxdepth 2 -type f \( -name "biome.json" -o -name "biome.toml" -o -name ".biomerc.json" \) 2>/dev/null

Repository: codervivek5/VigyBag

Length of output: 75


🏁 Script executed:

# Also check for eslint or other linting configs that might mention this
find . -maxdepth 2 -type f \( -name ".eslintrc*" -o -name "eslint.config.*" \) 2>/dev/null

Repository: codervivek5/VigyBag

Length of output: 78


🏁 Script executed:

# Check if Error is referenced anywhere else in App.jsx to ensure the fix is complete
rg "Error" src/App.jsx -A 2 -B 2

Repository: codervivek5/VigyBag

Length of output: 319


🏁 Script executed:

# Check if the Error component file exists
find . -path "*/User/pages/404-Page/Error*" -type f

Repository: codervivek5/VigyBag

Length of output: 98


🏁 Script executed:

# Read the Biome configuration to check if Error is restricted
cat biome.json

Repository: codervivek5/VigyBag

Length of output: 1838


🏁 Script executed:

# Also check the content of Error.jsx to understand what it is
cat -n src/User/pages/404-Page/Error.jsx | head -20

Repository: codervivek5/VigyBag

Length of output: 1001


Rename the Error import to avoid shadowing the global Error.

Biome flags Error as a restricted global name in its recommended ruleset. Renaming the import to ErrorPage avoids the lint error and confusion.

🛠️ Suggested fix
-import Error from "./User/pages/404-Page/Error";
+import ErrorPage from "./User/pages/404-Page/Error";
@@
-          <Route path="*" element={<Error />} />
+          <Route path="*" element={<ErrorPage />} />

Also applies to: 161-161

🧰 Tools
🪛 Biome (2.3.13)

[error] 36-36: Do not shadow the global "Error" property.

Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.

(lint/suspicious/noShadowRestrictedNames)

🤖 Prompt for AI Agents
In `@src/App.jsx` at line 36, The import named Error shadows the global Error;
rename the import to ErrorPage (change the import from "Error" to "ErrorPage"
for the module imported from "./User/pages/404-Page/Error") and update all
usages of the component (e.g., JSX elements or references currently using Error,
such as the component rendered around the block at the previous usage) to use
ErrorPage so the global name is not shadowed.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also take a look at this one issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Check if Certification is used anywhere in App.jsx
echo "=== Checking if Certification is used in App.jsx ==="
rg "Certification" src/App.jsx -n

# Check for duplicate import patterns more systematically
echo -e "\n=== Checking for duplicate imports ==="
cat src/App.jsx | grep "^import" | sort | uniq -d

# List all imports to see the full picture
echo -e "\n=== All imports in order ==="
cat -n src/App.jsx | grep "^[[:space:]]*[0-9]*[[:space:]]*import"

Length of output: 4865


@codervivek5, I've found several issues in src/App.jsx beyond the Error shadowing:

Issues Found:

  1. 🔴 Duplicate imports (lines 6-9 are duplicated later):

    • Home imported twice (lines 6 & 18)
    • UserAuth imported twice (lines 7 & 13)
    • Privacy imported twice (lines 8 & 19)
    • TermsAndConditions imported twice (lines 9 & 20)
  2. 🟡 Unused imports:

    • Certification (line 29) - no route uses this component
    • Team (line 35) - not referenced anywhere in the routes
  3. 🔴 Error shadowing (line 36) - as already flagged

Recommended fixes:

Remove duplicate imports (lines 6-9):

-import Home from "./User/pages/Home";
-import UserAuth from "./User/pages/UserAuth";
-import Privacy from "./User/pages/Privacy-Policy";
-import TermsAndConditions from "./User/pages/TermsAndCondition";
-

 // User pages (FIXED IMPORTS)

Remove unused imports:

-import Certification from "./User/pages/Certification";
 import ReturnAndCancellation from "./User/pages/ReturnAndCancellation";

-import Team from "./User/components/Team/Team";
 import Error from "./User/pages/404-Page/Error";

Rename Error to ErrorPage:

-import Error from "./User/pages/404-Page/Error";
+import ErrorPage from "./User/pages/404-Page/Error";
-          <Route path="*" element={<Error />} />
+          <Route path="*" element={<ErrorPage />} />

These changes will clean up the imports and resolve the linting issues.


🧬 Code Graph Analysis Results
  • File: src/Admin/AdminLayout.jsx, lines 6-14
const AdminLayout = () => {
  return (
    <div>
      {/* <AdminNavbar /> */}
      <Outlet />
      {/* <AdminFooter /> */}
    </div>
  );
};
  • File: src/PrivateRoute.jsx, lines 4-7
const PrivateRoute = () => {
  const isLoggedIn = localStorage.getItem("isLoggedIn") === "true";
  return isLoggedIn ? <Outlet /> : <Navigate to="/auth" />;
};
  • File: src/context/AuthContext.jsx, lines 5-16
export const AuthProvider = ({ children }) => {
  const [isAdmin, setIsAdmin] = useState(false);

  const loginAsAdmin = () => setIsAdmin(true);
  const loginAsUser = () => setIsAdmin(false);

  return (
    <AuthContext.Provider value={{ isAdmin, loginAsAdmin, loginAsUser }}>
      {children}
    </AuthContext.Provider>
  );
};
  • File: src/User/UserLayout.jsx, lines 11-38
const UserLayout = () => {
  const location = useLocation();

  // Determine which navbar to show based on the current route
  const isAdminRoute = location.pathname.startsWith("/admin");

  return (
    <>
      {/* Show AdminNavbar only for /admin routes */}
      {isAdminRoute ? <AdminNavbar /> : <UserNavbar />}

      {/* Scroll Progress bar */}
      <ScrollProgressBar />

      {/* Main Outlet (page content) */}
      <Outlet />

      {/* Common Footer */}
      <Footer />

      {/* Back to top button */}
      <GoToTop />

      {/* Show Feedback Button only for non-admin routes */}
      {!isAdminRoute && <FeedbackButton />}
    </>
  );
};

import PrivateRoute from "./PrivateRoute";

// Orders
import OrderDetails from "./User/pages/Order/Orderdetails";
import MyOrders from "./User/pages/Order/MyOrders";
import DashboardOrders from "./User/pages/Dashboard/dashboard-order";
import DashboardCart from "./User/pages/Dashboard/dashboard-cart";
import DashboardWishlist from "./User/pages/Dashboard/dashboard-wishlist";
import Checkout from "./User/pages/Order/Checkout";
import Cart from "./User/pages/Order/Cart";
import Wishlist from "./User/pages/Order/Wishlist";
import Error from "./User/pages/404-Page/Error";
import ProductDetails from "./User/components/Products/ProductDetails";
import Help from "./User/pages/Help/Help";
import Privacy from "./User/pages/Privacy-Policy/Privacy";
import Payment from "./User/pages/Payment/Payment";
import MeetTheMakers from "./User/pages/MeetTheMakers/MeetTheMakers.jsx";
import Confirmation from "./User/pages/Confirmation";
import Cancellation from "./User/pages/Cancellation";

import ReturnAndCancellation from "./User/pages/ReturnAndCancellation/returnAndCancellation";
import EPR_Page from "./User/pages/EPRPage/EPR_Page";
import FAQ from "./User/pages/FAQ/Faq";
import PrivateRoute from "./PrivateRoute";
import TermsAndConditions from "./User/pages/TermsAndCondition/TermsAndCondition";
// import FeedbackButton from "./User/components/FeedbackForm/FeedBtn";
import FeedbackModal from "./User/components/FeedbackForm/Feedback";
// Dashboard extras
import DashboardOrders from "./User/pages/Dashboard/dashboard-order";
import DashboardCart from "./User/pages/Dashboard/dashboard-cart";
import DashboardWishlist from "./User/pages/Dashboard/dashboard-wishlist";
import NotificationPage from "./User/pages/Dashboard/NotificationPage";
import ProfilePage from "./User/pages/Dashboard/ProfilePage";
import CareerPage from "./User/pages/Career-Page/careerPage.jsx";
import ServicePage from "./User/pages/Service-Page/service.jsx";
import Shipping from "./User/pages/Shipping/shipping";
import GiftCard from "./User/pages/Gift-Card/gift-card.jsx";
import Payment_Policy from "./User/pages/Payment-Policy/payment-policy.jsx";
import Certification from "./User/pages/Certification/Certification.jsx";
// Admin components
import AdminVerificationPage from "./User/pages/Admin-Verification/Admin.jsx";
import AdminLayout from "./Admin/AdminLayout";
import AdminLogin from "./Admin/Pages/AdminLogin";
import VigyForm from "./Admin/Pages/VigyForm";
import AdminPanel from "./Admin/Pages/AdminPanel";
import ProductForm from "./Admin/Pages/ProductForm";

// Latest In Market
import LatestInMarket from "./User/pages/Latest_in_the_Market/LatestInMarket";
// Products
import ProductDetails from "./User/components/Products/ProductDetails";

// Latest in Market
import LatestInMarket from "./User/pages/Latest_in_the_Market";
import HandMadeSoaps from "./User/pages/Latest_in_the_Market/HandMadeSoaps";
import ArtSupplies from "./User/pages/Latest_in_the_Market/ArtSupplies";
import CeramicDinnerware from "./User/pages/Latest_in_the_Market/CeramicDinnerware";
Expand All @@ -61,10 +65,9 @@ import StorageBaskets from "./User/pages/Latest_in_the_Market/StorageBaskets";
import OrganicSoaps from "./User/pages/Latest_in_the_Market/OrganicSoaps";
import OrganicTea from "./User/pages/Latest_in_the_Market/OrganicTea";
import NaturalCosmetics from "./User/pages/Latest_in_the_Market/NaturalCosmetics";
import ForgotPasswordForm from "./User/pages/ForgotPasswordForm";

// Popular Categories
import PopularCategories from "./User/pages/Popular_Categories/Popular_Categories";
import PopularCategories from "./User/pages/Popular_Categories";
import BeautyWellness from "./User/pages/Popular_Categories/Beauty-Wellness";
import BodyCare from "./User/pages/Popular_Categories/Body-Care";
import CustomizedGifts from "./User/pages/Popular_Categories/Customized-Gifts";
Expand All @@ -74,217 +77,99 @@ import FurnitureDecor from "./User/pages/Popular_Categories/Furniture-Decor";
import HealthSupplements from "./User/pages/Popular_Categories/Health-Supplements";
import PrintingStationery from "./User/pages/Popular_Categories/Printing-Stationery";

import { Helmet } from "react-helmet-async";

// Additional pages
import Blog from "./User/pages/Blog/Blog.jsx";
import GiftcardPage from "./User/pages/AdditionalPages/GiftCardPage";
import Sponsorships from "./User/pages/Sponsorships/Sponsorships";
import Warranty from "./User/pages/Warranty/Warranty";
import ProductCare from "./User/pages/ProductCare/ProductCare";
import Subscription from "./User/pages/Subscription/Subscription";
import Events from "./User/pages/Events/Events";
// Admin
import AdminVerificationPage from "./User/pages/Admin-Verification";
import AdminLayout from "./Admin/AdminLayout";
import AdminLogin from "./Admin/Pages/AdminLogin";
import VigyForm from "./Admin/Pages/VigyForm";
import AdminPanel from "./Admin/Pages/AdminPanel";
import ProductForm from "./Admin/Pages/ProductForm";

export default function App() {
return (
<AuthProvider>
<Helmet>
{/* Botpress chatbot script */}
<script src="https://cdn.botpress.cloud/webchat/v2/inject.js"></script>
<script src="https://mediafiles.botpress.cloud/f910a06e-f7d4-4424-8642-e3cdffe933b5/webchat/v2/config.js"></script>
</Helmet>

<Routes>
{/* User routes */}
<Route path="/" element={<UserLayout />}>
<Route index element={<Home />} /> {/* Home page route */}
{/* Latest in the Market routes */}
<Route index element={<Home />} />

{/* Latest in Market */}
<Route path="latestInMarket" element={<LatestInMarket />} />
<Route
path="latestInMarket/handMadeSoaps"
element={<HandMadeSoaps />}
/>
<Route path="latestInMarket/handMadeSoaps" element={<HandMadeSoaps />} />
<Route path="latestInMarket/artSupplies" element={<ArtSupplies />} />
<Route
path="latestInMarket/ceramicDinnerware"
element={<CeramicDinnerware />}
/>
<Route
path="latestInMarket/bambooProducts"
element={<BambooProducts />}
/>
<Route
path="latestInMarket/storageBaskets"
element={<StorageBaskets />}
/>
<Route
path="auth/success"
element={<StorageBaskets />}
/>
<Route
path="latestInMarket/organicSoaps"
element={<OrganicSoaps />}
/>
<Route path="latestInMarket/ceramicDinnerware" element={<CeramicDinnerware />} />
<Route path="latestInMarket/bambooProducts" element={<BambooProducts />} />
<Route path="latestInMarket/storageBaskets" element={<StorageBaskets />} />
<Route path="latestInMarket/organicSoaps" element={<OrganicSoaps />} />
<Route path="latestInMarket/organicTea" element={<OrganicTea />} />
<Route
path="latestInMarket/naturalCosmetics"
element={<NaturalCosmetics />}
/>
{/* Popular Categories routes */}
<Route path="latestInMarket/naturalCosmetics" element={<NaturalCosmetics />} />

{/* Popular Categories */}
<Route path="popularCategories" element={<PopularCategories />} />
<Route
path="popularCategories/beautyWellness"
element={<BeautyWellness />}
/>
<Route path="popularCategories/beautyWellness" element={<BeautyWellness />} />
<Route path="popularCategories/bodyCare" element={<BodyCare />} />
<Route
path="popularCategories/customizedGifts"
element={<CustomizedGifts />}
/>
<Route
path="popularCategories/fashionAccessories"
element={<FashionAccessories />}
/>
<Route
path="popularCategories/foodBeverages"
element={<FoodBeverages />}
/>
<Route
path="popularCategories/furnitureDecor"
element={<FurnitureDecor />}
/>
<Route
path="popularCategories/healthSupplements"
element={<HealthSupplements />}
/>
<Route
path="popularCategories/printingStationery"
element={<PrintingStationery />}
/>
{/* Other user routes */}
<Route path="contributors" element={<Contributors />} />
<Route path="popularCategories/customizedGifts" element={<CustomizedGifts />} />
<Route path="popularCategories/fashionAccessories" element={<FashionAccessories />} />
<Route path="popularCategories/foodBeverages" element={<FoodBeverages />} />
<Route path="popularCategories/furnitureDecor" element={<FurnitureDecor />} />
<Route path="popularCategories/healthSupplements" element={<HealthSupplements />} />
<Route path="popularCategories/printingStationery" element={<PrintingStationery />} />

{/* Static pages */}
<Route path="about-us" element={<AboutUs />} />
<Route path="meet-the-makers" element={<MeetTheMakers />} />
<Route path="help" element={<Help />} /> {/* Help page route */}
<Route path="privacy-policy" element={<Privacy />} />
{/* Privacy policy page route */}
<Route path="cart" element={<Cart />} />
<Route
path="productDetails/:productId"
element={<ProductDetails />}
/>{" "}
{/* Product details route */}
<Route path="wishlist" element={<Wishlist />} />
{/* Wishlist page route */}
<Route path="contributors" element={<Contributors />} />
<Route path="contact" element={<Contact />} />
{/* Contact page route */}
<Route path="forgot-password" element={<ForgotPasswordForm />} />
{/* Forgot password page route */}
<Route path="team" element={<Team />} /> {/* Team page route */}
<Route path="auth" element={<UserAuth />} />
{/* User authentication page route */}
<Route path="vigy-login" element={<VigyForm />} />
<Route path="faq" element={<FAQ />} /> {/* FAQ page route */}
<Route path="help" element={<Help />} />
<Route path="privacy-policy" element={<Privacy />} />
<Route path="terms-and-condition" element={<TermsAndConditions />} />
{/* Terms and Conditions page route */}
<Route path="feedback" element={<FeedbackModal />} />
{/* Feedback page route */}
<Route
path="return-and-cancellation"
element={<ReturnAndCancellation />}
/>
<Route path="payment-policy" element={<Payment_Policy />} />
{/* Return and Cancellation page route */}
<Route path="epr-compliance" element={<EPR_Page />} />{" "}
{/* EPR page route */}
{/* Backward-compat: legacy URL */}
<Route
path="epr"
element={<Navigate to="/epr-compliance" replace />}
/>
<Route path="faq" element={<FAQ />} />
<Route path="meet-the-makers" element={<MeetTheMakers />} />
<Route path="career" element={<CareerPage />} />
<Route path="service" element={<ServicePage />} />
<Route path="shipping" element={<Shipping />} />
<Route path="gift-card" element={<GiftCard />} />
{/* EPR page route */}
{/* Private routes requiring authentication */}
<Route path="payment-policy" element={<Payment_Policy />} />
<Route path="return-and-cancellation" element={<ReturnAndCancellation />} />
<Route path="epr-compliance" element={<EPR_Page />} />
<Route path="epr" element={<Navigate to="/epr-compliance" replace />} />

{/* Auth & orders */}
<Route path="cart" element={<Cart />} />
<Route path="wishlist" element={<Wishlist />} />
<Route path="checkout" element={<Checkout />} />
<Route path="confirm" element={<Confirmation />} />
<Route path="cancel" element={<Cancellation />} />
<Route path="orderDetails" element={<OrderDetails />} />
<Route path="myorders" element={<MyOrders />} />
<Route path="productDetails/:productId" element={<ProductDetails />} />

{/* Private */}
<Route element={<PrivateRoute />}>
<Route path="/admin" element={<AdminLayout />}>
<Route index element={<AdminPanel />} /> {/* Admin panel route */}
<Route path="vigy-form" element={<VigyForm />} />
{/* Admin Vigy form route */}
<Route path="product-form" element={<ProductForm />} />
{/* Admin product form route */}
</Route>
<Route path="dashboard" element={<Dashboard />} />
{/* User dashboard route */}
<Route path="confirm" element={<Confirmation />} />
{/* Order confirmation route */}
<Route path="cancel" element={<Cancellation />} />
{/* Order cancellation route */}
<Route path="orderDetails" element={<OrderDetails />} />
{/* Order details route */}
<Route path="myorders" element={<MyOrders />} />
{/* Backward-compatibility redirects */}
<Route
path="my-orders"
element={<Navigate to="/myorders" replace />}
/>
<Route
path="myOrders"
element={<Navigate to="/myorders" replace />}
/>
{/* My orders route */}
<Route path="checkout" element={<Checkout />} />
{/* Checkout route */}
<Route path="productDetails" element={<ProductDetails />} />
{/* Product details route */}
<Route path="payment" element={<Payment />} /> {/* Payment route */}
<Route path="dashboard-order" element={<DashboardOrders />} />
{/* Dashboard orders route */}
<Route path="dashboard-cart" element={<DashboardCart />} />
{/* Dashboard cart route */}
<Route path="dashboard-wishlist" element={<DashboardWishlist />} />
{/* Dashboard wishlist route */}
<Route
path="dashboard-notifications"
element={<NotificationPage />}
/>
{/* Dashboard notifications route */}
{/* Not in use routes */}
<Route path="blog" element={<Blog />} />
{/* additional routes */}
<Route path="giftcard" element={<GiftcardPage />} />
<Route path="sponsorships" element={<Sponsorships />} />
<Route path="warranty" element={<Warranty />} />
<Route path="productCare" element={<ProductCare />} />
<Route path="subscription" element={<Subscription />} />
<Route path="events" element={<Events />} />
<Route path="dashboard-notifications" element={<NotificationPage />} />
<Route path="profile" element={<ProfilePage />} />
{/* Dashboard Profile route */}
</Route>
{/* Certification page route */}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you have remove it ???

<Route path="certification" element={<Certification />} />
{/* Backward-compat: legacy URL */}
<Route
path="certificate"
element={<Navigate to="/certification" replace />}
/>
{/* 404 Error page route */}


<Route path="*" element={<Error />} />
</Route>

{/* Admin routes */}
{/* Admin */}
<Route path="/admin" element={<AdminLayout />}>
<Route index element={<AdminPanel />} /> {/* Admin panel route */}
<Route index element={<AdminPanel />} />
<Route path="vigy-form" element={<VigyForm />} />
{/* Admin Vigy form route */}
<Route path="product-form" element={<ProductForm />} />
{/* Admin product form route */}
</Route>

{/* Admin verification and login routes */}
<Route path="admin-verification" element={<AdminVerificationPage />} />
<Route path="/admin/login" element={<AdminLogin />} />
<Route path="/admin-verification" element={<AdminVerificationPage />} />
</Routes>
</AuthProvider>
);
Expand Down
Loading