404
8 |9 | Page not found 10 |
11 |12 | Sorry, we couldn't find the page you're looking for. 13 |
14 |├── src ├── App.css ├── app │ ├── constants.js │ └── store.js ├── pages │ ├── CartPage.js │ ├── LoginPage.js │ ├── SignupPage.js │ ├── ForgotPasswordPage.js │ ├── AdminOrdersPage.js │ ├── AdminProductFormPage.js │ ├── AdminHome.js │ ├── UserOrdersPage.js │ ├── UserProfilePage.js │ ├── AdminProductDetailPage.js │ ├── Home.js │ ├── ProductDetailPage.js │ ├── 404.js │ ├── OrderSuccessPage.js │ └── Checkout.js ├── features │ ├── counter │ │ ├── counterAPI.js │ │ ├── Counter.js │ │ └── counterSlice.js │ ├── order │ │ ├── Order.js │ │ ├── orderAPI.js │ │ └── orderSlice.js │ ├── auth │ │ ├── components │ │ │ ├── Protected.js │ │ │ ├── ProtectedAdmin.js │ │ │ ├── Logout.js │ │ │ ├── ForgotPassword.js │ │ │ ├── Login.js │ │ │ └── Signup.js │ │ ├── authAPI.js │ │ └── authSlice.js │ ├── user │ │ ├── userAPI.js │ │ ├── userSlice.js │ │ └── components │ │ │ └── UserOrders.js │ ├── cart │ │ ├── CartAPI.js │ │ ├── CartSlice.js │ │ └── Cart.js │ ├── common │ │ ├── Footer.js │ │ ├── Pagination.js │ │ └── Modal.js │ ├── product │ │ ├── ProductAPI.js │ │ ├── ProductSlice.js │ │ └── components │ │ │ ├── ProductDetail.js │ │ │ └── ProductList.js │ ├── admin │ │ └── components │ │ │ ├── AdminOrders.js │ │ │ ├── AdminProductDetail.js │ │ │ └── ProductForm.js │ └── navbar │ │ └── Navbar.js ├── setupTests.js ├── reportWebVitals.js ├── App.test.js ├── index.css ├── index.js ├── logo.svg └── App.js ├── public ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── space-craft.png ├── manifest.json └── index.html ├── tailwind.config.js ├── .gitignore ├── package.json └── README.md /src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PB2204/space-craft/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PB2204/space-craft/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PB2204/space-craft/HEAD/public/logo512.png -------------------------------------------------------------------------------- /public/space-craft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PB2204/space-craft/HEAD/public/space-craft.png -------------------------------------------------------------------------------- /src/app/constants.js: -------------------------------------------------------------------------------- 1 | export const ITEMS_PER_PAGE = 10; 2 | export function discountedPrice(item){ 3 | return Math.round(item.price*(1-item.discountPercentage/100),2) 4 | } 5 | -------------------------------------------------------------------------------- /src/pages/CartPage.js: -------------------------------------------------------------------------------- 1 | import Cart from "../features/cart/Cart"; 2 | 3 | function CartPage() { 4 | return
404
8 |12 | Sorry, we couldn't find the page you're looking for. 13 |
14 |Order Successfully Placed
26 |30 | You can check your order in My Account > My Orders 31 |
32 |Buy What You Want.
9 |Download On
17 |Google Play Store
18 |Download On
27 |Apple Store
28 |34 | {' '} 35 | © Space Craft , 2023{' '} 36 |
37 |
22 | 73 | Send me back to{' '} 74 | 78 | Login 79 | 80 |
81 |25 | Showing{' '} 26 | 27 | {(page - 1) * ITEMS_PER_PAGE + 1} 28 | {' '} 29 | to{' '} 30 | 31 | {page * ITEMS_PER_PAGE > totalItems 32 | ? totalItems 33 | : page * ITEMS_PER_PAGE} 34 | {' '} 35 | of {totalItems} results 36 |
37 |
29 | 114 | Not A Member ?{' '} 115 | 119 | Create An Account 120 | 121 |
122 |${discountedPrice(item)}
51 |53 | {item.brand} 54 |
55 |Subtotal
78 |$ {order.totalAmount}
79 |Total Items In Cart
82 |{order.totalItems} items
83 |85 | Shipping Address : 86 |
87 |91 | {order.selectedAddress.name} 92 |
93 |94 | {order.selectedAddress.street} 95 |
96 |97 | {order.selectedAddress.pinCode} 98 |
99 |103 | Phone: {order.selectedAddress.phone} 104 |
105 |106 | {order.selectedAddress.city} 107 |
108 |
30 | 148 | Already A Member ?{' '} 149 | 153 | Log In 154 | 155 |
156 |${discountedPrice(item)}
77 |79 | {item.brand} 80 |
81 |Subtotal
131 |$ {totalAmount}
132 |Total Items In Cart
135 |{totalItems} items
136 |138 | Shipping And Taxes Are Calculated At Checkout. 139 |
140 |150 | Or {'\u00A0'} 151 | 152 | 159 | 160 |
161 ||
80 | handleSort({
81 | sort: 'id',
82 | order: sort?._order === 'asc' ? 'desc' : 'asc',
83 | })
84 | }
85 | >
86 | Order# {' '}
87 | {sort._sort === 'id' &&
88 | (sort._order === 'asc' ? (
89 | |
94 | Items | 95 |
98 | handleSort({
99 | sort: 'totalAmount',
100 | order: sort?._order === 'asc' ? 'desc' : 'asc',
101 | })
102 | }
103 | >
104 | Total Amount {' '}
105 | {sort._sort === 'totalAmount' &&
106 | (sort._order === 'asc' ? (
107 | |
112 | Shipping Address | 113 |Status | 114 |Actions | 115 |
|---|---|---|---|---|---|
|
121 |
122 |
123 | {order.id}
124 |
125 | |
126 |
127 | {order.items.map((item) => (
128 |
129 |
140 | ))}
141 |
130 |
135 |
136 | {item.title} - #{item.quantity} - $
137 | {discountedPrice(item)}
138 |
139 | |
142 |
143 |
144 | ${order.totalAmount}
145 |
146 | |
147 |
148 |
149 |
158 |
150 | {order.selectedAddress.name},
151 |
152 | {order.selectedAddress.street},
153 | {order.selectedAddress.city},
154 | {order.selectedAddress.state},
155 | {order.selectedAddress.pinCode},
156 | {order.selectedAddress.phone},
157 | |
159 | 160 | {order.id === editableOrderId ? ( 161 | 167 | ) : ( 168 | 173 | {order.status} 174 | 175 | )} 176 | | 177 |
178 |
179 |
192 |
180 |
185 |
186 |
191 | |
193 |
51 |
52 | 150 | ${product.price} 151 |
152 |153 | ${discountedPrice(product)} 154 |
155 | 156 | {/* Reviews */} 157 |{product.rating} out of 5 stars
175 |319 | {product.description} 320 |
321 |{product.description}
345 |177 | ${product.price} 178 |
179 |180 | ${discountedPrice(product)} 181 |
182 | 183 | {/* Reviews */} 184 |{product.rating} out of 5 stars
202 |346 | {product.description} 347 |
348 |{product.description}
372 |
436 |
442 | ${discountedPrice(product)} 443 |
444 |445 | ${product.price} 446 |
447 |product deleted
452 |out of stock
457 |302 | Choose from Existing addresses 303 |
304 |320 | {address.name} 321 |
322 |323 | {address.street} 324 |
325 |326 | {address.pinCode} 327 |
328 |332 | Phone: {address.phone} 333 |
334 |335 | {address.city} 336 |
337 |${discountedPrice(item)}
415 |417 | {item.brand} 418 |
419 |Subtotal
460 |$ {totalAmount}
461 |Total Items In Cart
464 |{totalItems} items
465 |467 | Shipping And Taxes Are Calculated At Checkout. 468 |
469 |479 | Or {'\u00A0'} 480 | 481 | 488 | 489 |
490 |