Screen
+{product.screen}
+diff --git a/src/App.tsx b/src/App.tsx index 372e4b42066..7bfc4d3c45b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,72 @@ import './App.scss'; +import { Routes, Route } from 'react-router-dom'; +import { Frame } from './components/Frame'; +import { HomePage } from './modules/HomePage'; +import { ProductsPage } from './modules/ProductsPage'; +import phones from '../public/api/phones.json'; +import tablets from '../public/api/tablets.json'; +import accessories from '../public/api/accessories.json'; +import products from '../public/api/products.json'; +import { ProductPage } from './modules/ProductPage'; +import { useContext } from 'react'; +import { AddToFavContext } from './contexts/AddToFavContext'; +import { NotFoundPage } from './modules/NotFoundPage'; +import { CartPage } from './modules/CartPage/CartPage'; -export const App = () => ( -
{fav.length}
++ {cart.reduce((sum, item) => sum + item.quantity, 0)} +
++ {`Total for ${cart.reduce( + (sum, item) => sum + item.quantity, + 0, + )} items`} +
+ + + + ++ Checkout is not implemented yet. Do you want to clear the + Cart? +
+ +
+ {item.name}
+{item.quantity}
+ +
+ Mobile phones
++ {phonesAmount} models +
+
+ Tablets
++ {tabletssAmount} models +
+
+ Accessories
++ {accessoriesAmount} models +
+
+ ) : (
+
+ )}
+ {desc.text}
+Available colors
+ID: 802390
+Select capacity
+${price}
++ ${fullPrice} +
+ > + ) : ( +${fullPrice}
+ )} +Screen
+{product.screen}
+Capacity
+{product.capacity}
+Processor
+{product.processor}
+RAM
+{product.ram}
+Screen
+{product.screen}
+Resolution
+{product.resolution}
+Processor
+{product.processor}
+RAM
+{product.ram}
+Built in memory
+{product.capacity}
+Camera
+{product.camera}
+Zoom
+{product.zoom}
+Cell
+{product.cell.join(', ')}
+{products.length} models
+ ) : ( +{products.length} items
+ )} ++ There are no {title.toLowerCase()} matching the query +
+ )} + + {title !== 'Favourites' && + sortedProducts.slice(firstItem, lastItem).map(product => ( +{data.title}
+${product.price}
++ ${product.fullPrice} +
+ > + ) : ( +${product.fullPrice}
+ )} +Screen
+{product.screen}
+Capacity
+{product.capacity}
+RAM
+{product.ram}
+