diff --git a/src/components/common/header/Header.tsx b/src/components/common/header/Header.tsx index 92aa527..b6d733d 100644 --- a/src/components/common/header/Header.tsx +++ b/src/components/common/header/Header.tsx @@ -200,7 +200,7 @@ const Header: React.FC = ({ searchQuery, setSearchQuery }) => { )} - {userInfo.name.split(" ")[0]} + {userInfo.name?.split(" ")[0]} {dropdownOpen && } diff --git a/src/pages/paymentPage.tsx b/src/pages/paymentPage.tsx index 3bb3dec..07ee29f 100644 --- a/src/pages/paymentPage.tsx +++ b/src/pages/paymentPage.tsx @@ -174,5 +174,24 @@ const SuccessfulPayment = () => { ); }; +const CancelledPayment = () => ( +
+
+

+ ❌ Payment Was Cancelled +

+

+ Checkout Details about your carts If you wish to adjust ! +

+

Thank you for shopping with us.

+ + + + +
+
+); export default Payment; -export { SuccessfulPayment }; +export { SuccessfulPayment, CancelledPayment }; diff --git a/src/routes/AppRoutes.tsx b/src/routes/AppRoutes.tsx index 4054464..feb3318 100644 --- a/src/routes/AppRoutes.tsx +++ b/src/routes/AppRoutes.tsx @@ -33,10 +33,13 @@ import BuyerOrders from "../pages/BuyerOrders"; import SignupVerification from "../pages/SignupVerification"; import SmoothScroll from "../utils/SmoothScroll"; import NotFound from "../pages/NotFound"; -import Payment, { SuccessfulPayment } from "../pages/paymentPage"; import UserNotifications from "../components/common/user-notifications/UserNotifcations"; import UserNotificationDetail from "../components/common/user-notifications/UserNotificationDetail"; import { LogoutProvider } from "../components/dashboard/admin/LogoutContext"; +import Payment, { + CancelledPayment, + SuccessfulPayment, +} from "../pages/paymentPage"; const AppRoutes = () => { const navigate = useNavigate(); @@ -60,62 +63,64 @@ const AppRoutes = () => { }; return ( - - }> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> + + + }> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } + /> + + } /> + } /> + } /> + } /> + } /> + } + path="/login" + element={( + + + + )} /> - - } /> - } /> - } /> - } /> - } /> - - - - - )} - /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } - /> - } - /> - } /> - } /> - + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } + /> + } + /> + } /> + } /> + + ); };