{category.description}
+ + ) +} diff --git a/frontend/src/components/Footer.jsx b/frontend/src/components/Footer.jsx new file mode 100644 index 0000000..6037da6 --- /dev/null +++ b/frontend/src/components/Footer.jsx @@ -0,0 +1,54 @@ +import React from 'react' +import { Link } from 'react-router-dom' +import '../styles/global.css' + +export default function Footer() { + return ( + + ) +} diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx new file mode 100644 index 0000000..8fe840d --- /dev/null +++ b/frontend/src/components/Navbar.jsx @@ -0,0 +1,72 @@ +import React, { useContext } from 'react' +import { Link, useNavigate } from 'react-router-dom' +import { AuthContext } from '../context/AuthContext' +import { CartContext } from '../context/CartContext' +import SearchBar from './SearchBar' +import '../styles/global.css' + +export default function Navbar() { + const { user, token, logout } = useContext(AuthContext) + const { cart } = useContext(CartContext) + const navigate = useNavigate() + + const handleLogout = () => { + logout() + navigate('/') + } + + return ( + + ) +} diff --git a/frontend/src/components/ProductCard.jsx b/frontend/src/components/ProductCard.jsx new file mode 100644 index 0000000..533b3bb --- /dev/null +++ b/frontend/src/components/ProductCard.jsx @@ -0,0 +1,51 @@ +import React from 'react' +import { Link } from 'react-router-dom' +import '../styles/global.css' + +export default function ProductCard({ product }) { + const price = product.discount_price || product.price + const discount = + product.discount_price && product.is_on_sale + ? Math.round( + ((product.price - product.discount_price) / product.price) * 100 + ) + : 0 + + return ( +{product.brand}
++ {product.stock > 0 ? ( + In Stock + ) : ( + Out of Stock + )} +
+ + View Details + ++ Founded in 2020, StyleHub started as a passion project to bring + quality fashion and footwear to customers worldwide. What began as + a small collection has grown into a comprehensive online store + featuring over 1000 products from leading brands. +
++ We believe everyone deserves access to stylish, high-quality + products at reasonable prices. Our mission is to make fashion + accessible, affordable, and enjoyable for everyone. +
+Orders shipped within 24 hours to most locations
+30-day satisfaction guarantee on all purchases
+Your payment information is always protected
+Our team is ready to help anytime
+We offer competitive prices and frequent discounts
+Shop on the go with our mobile apps
++ We have a passionate team of fashion experts, developers, and + customer service professionals working to bring you the best + shopping experience. +
+Your cart is empty
+ + Continue Shopping + +| Product | +Price | +Quantity | +Total | +Action | +
|---|---|---|---|---|
|
+
+
+
+
+ {item.product.name} + {item.size &&Size: {item.size} } + {item.color &&Color: {item.color} } + |
+ ${(item.product.discount_price || item.product.price).toFixed(2)} | +
+
+
+ {item.quantity}
+
+
+ |
+ + ${((item.product.discount_price || item.product.price) * item.quantity).toFixed(2)} + | ++ + | +
Discover the latest in fashion and footwear
+ + Shop Now + +Up to 50% off on selected items
+ + View All Sales + +Get exclusive deals and updates
+ + ++ Don't have an account? Sign up here +
+ +Demo Account:
+Email: user@example.com
+Password: password123
+You haven't placed any orders yet.
+ + Start Shopping + +{item.product.name}
+Qty: {item.quantity}
+${item.price.toFixed(2)}
+{order.shipping_address}
++ {order.shipping_city}, {order.shipping_postal_code} +
+{order.shipping_country}
+{product.brand}
+ +{product.description}
+ + {product.colors.length > 0 && ( +No products found.
+Huge discounts on selected items - Limited time only!
+No products on sale at the moment.
+Your wishlist is empty
+ + Browse Products + +