@@ -33,10 +33,13 @@ import BuyerOrders from "../pages/BuyerOrders";
33
33
import SignupVerification from "../pages/SignupVerification" ;
34
34
import SmoothScroll from "../utils/SmoothScroll" ;
35
35
import NotFound from "../pages/NotFound" ;
36
- import Payment , { SuccessfulPayment } from "../pages/paymentPage" ;
37
36
import UserNotifications from "../components/common/user-notifications/UserNotifcations" ;
38
37
import UserNotificationDetail from "../components/common/user-notifications/UserNotificationDetail" ;
39
38
import { LogoutProvider } from "../components/dashboard/admin/LogoutContext" ;
39
+ import Payment , {
40
+ CancelledPayment ,
41
+ SuccessfulPayment ,
42
+ } from "../pages/paymentPage" ;
40
43
41
44
const AppRoutes = ( ) => {
42
45
const navigate = useNavigate ( ) ;
@@ -60,62 +63,64 @@ const AppRoutes = () => {
60
63
} ;
61
64
return (
62
65
< SmoothScroll >
63
- < Routes >
64
- < Route path = "/" element = { < RootLayout /> } >
65
- < Route index element = { < Homepage /> } />
66
- < Route path = "products" element = { < ProductPage /> } />
67
- < Route path = "products/:id" element = { < ProductDetails /> } />
68
- < Route path = "/carts" element = { < CartManagement /> } />
69
- < Route path = "/wishes" element = { < BuyerWishesList /> } />
70
- < Route path = "/orders" element = { < BuyerOrders /> } />
71
- < Route path = "/payment" element = { < Payment /> } />
72
- < Route path = "/payment/success" element = { < SuccessfulPayment /> } />
73
- < Route path = "/payment/canceled" element = { < Payment /> } />
74
- < Route path = "/notifications" element = { < UserNotifications /> } />
66
+ < LogoutProvider >
67
+ < Routes >
68
+ < Route path = "/" element = { < RootLayout /> } >
69
+ < Route index element = { < Homepage /> } />
70
+ < Route path = "products" element = { < ProductPage /> } />
71
+ < Route path = "products/:id" element = { < ProductDetails /> } />
72
+ < Route path = "/carts" element = { < CartManagement /> } />
73
+ < Route path = "/wishes" element = { < BuyerWishesList /> } />
74
+ < Route path = "/orders" element = { < BuyerOrders /> } />
75
+ < Route path = "/payment" element = { < Payment /> } />
76
+ < Route path = "/payment/success" element = { < SuccessfulPayment /> } />
77
+ < Route path = "/payment/canceled" element = { < Payment /> } />
78
+ < Route path = "/notifications" element = { < UserNotifications /> } />
79
+ < Route
80
+ path = "/notifications/:id"
81
+ element = { < UserNotificationDetail /> }
82
+ />
83
+ </ Route >
84
+ < Route path = "chat" element = { < ChatPage /> } />
85
+ < Route path = "/password-reset-link" element = { < GetLinkPage /> } />
86
+ < Route path = "/reset-password" element = { < ResetPassword /> } />
87
+ < Route path = "/register" element = { < RegisterUser /> } />
88
+ < Route path = "/verify-user" element = { < SignupVerification /> } />
89
+
75
90
< Route
76
- path = "/notifications/:id"
77
- element = { < UserNotificationDetail /> }
91
+ path = "/login"
92
+ element = { (
93
+ < AlreadyLogged >
94
+ < Login />
95
+ </ AlreadyLogged >
96
+ ) }
78
97
/>
79
- </ Route >
80
- < Route path = "chat" element = { < ChatPage /> } />
81
- < Route path = "/password-reset-link" element = { < GetLinkPage /> } />
82
- < Route path = "/reset-password" element = { < ResetPassword /> } />
83
- < Route path = "/register" element = { < RegisterUser /> } />
84
- < Route path = "/verify-user" element = { < SignupVerification /> } />
85
-
86
- < Route
87
- path = "/login"
88
- element = { (
89
- < AlreadyLogged >
90
- < Login />
91
- </ AlreadyLogged >
92
- ) }
93
- />
94
- < Route path = "2fa-verify" element = { < OtpVerificationForm /> } />
95
- < Route path = "/dashboard" element = { < SellerDashboard /> } />
96
- < Route path = "/dashboard/addproduct" element = { < AddProduct /> } />
97
- < Route path = "/update-password" element = { < UpdatePasswordPage /> } />
98
- < Route path = "/profile" element = { < UsersProfile /> } />
99
- < Route path = "/profile/update" element = { < UpdateUserProfile /> } />
100
- < Route path = "/dashboard/products" element = { < Products /> } />
101
- < Route path = "/dashboard/products/:id" element = { < AddProduct /> } />
102
- < Route path = "/dashboard/orders" element = { < SellerOrder /> } />
103
- < Route path = "/admin/dashboard" element = { < Dashboard /> } />
104
- < Route path = "/admin/users" element = { < UserManagement /> } />
105
- < Route path = "/admin/settings" element = { < Settings /> } />
106
- < Route path = "/admin/analytics" element = { < Analytics /> } />
107
- < Route path = "/admin/Products" element = { < Products /> } />
108
- < Route
109
- path = "/dashboard/notifications"
110
- element = { < SellerNotifications /> }
111
- />
112
- < Route
113
- path = "/dashboard/notifications/:id"
114
- element = { < NotificationDetail /> }
115
- />
116
- < Route path = "/dashboard/wishes" element = { < Wishes /> } />
117
- < Route path = "/*" element = { < NotFound /> } />
118
- </ Routes >
98
+ < Route path = "2fa-verify" element = { < OtpVerificationForm /> } />
99
+ < Route path = "/dashboard" element = { < SellerDashboard /> } />
100
+ < Route path = "/dashboard/addproduct" element = { < AddProduct /> } />
101
+ < Route path = "/update-password" element = { < UpdatePasswordPage /> } />
102
+ < Route path = "/profile" element = { < UsersProfile /> } />
103
+ < Route path = "/profile/update" element = { < UpdateUserProfile /> } />
104
+ < Route path = "/dashboard/products" element = { < Products /> } />
105
+ < Route path = "/dashboard/products/:id" element = { < AddProduct /> } />
106
+ < Route path = "/dashboard/orders" element = { < SellerOrder /> } />
107
+ < Route path = "/admin/dashboard" element = { < Dashboard /> } />
108
+ < Route path = "/admin/users" element = { < UserManagement /> } />
109
+ < Route path = "/admin/settings" element = { < Settings /> } />
110
+ < Route path = "/admin/analytics" element = { < Analytics /> } />
111
+ < Route path = "/admin/Products" element = { < Products /> } />
112
+ < Route
113
+ path = "/dashboard/notifications"
114
+ element = { < SellerNotifications /> }
115
+ />
116
+ < Route
117
+ path = "/dashboard/notifications/:id"
118
+ element = { < NotificationDetail /> }
119
+ />
120
+ < Route path = "/dashboard/wishes" element = { < Wishes /> } />
121
+ < Route path = "/*" element = { < NotFound /> } />
122
+ </ Routes >
123
+ </ LogoutProvider >
119
124
</ SmoothScroll >
120
125
) ;
121
126
} ;
0 commit comments