diff --git a/src/components/product/style.css b/src/components/product/style.css index c39aa1a..62e98ab 100644 --- a/src/components/product/style.css +++ b/src/components/product/style.css @@ -151,3 +151,4 @@ background: #06824d !important; color: #fff !important; } + diff --git a/src/components/search/SearchResults.jsx b/src/components/search/SearchResults.jsx index 91fd3d5..32757db 100644 --- a/src/components/search/SearchResults.jsx +++ b/src/components/search/SearchResults.jsx @@ -12,9 +12,9 @@ import { Rating, IconButton } from '@mui/material'; -import FavoriteIcon from '@mui/icons-material/Favorite'; -import StarIcon from '@mui/icons-material/Star'; import useFetchData from '../../useFetchData'; +import Product from '../product'; +import './style.css' const SearchResults = () => { const location = useLocation(); @@ -47,162 +47,20 @@ const SearchResults = () => { ); return ( - - + +
{filteredProducts.length > 0 ? ( - filteredProducts.map((product) => ( - - - - - - - - {/* Product Name */} - - {product.productName} - - {/* Rating and Brand Name */} - - - } - /> - - {product.brand} - - - {/* Price, Old Price, Discount */} - -

- ₹{product.price} -

- - ₹{product.oldPrice} - -

- {product.discount}% off -

-
- {/* Additional Info */} -

- Free delivery -

-

- Only Few Left -

-
-
-
+ filteredProducts.map((product,index) => ( +
+ +
)) ) : ( No results found )} - +
); }; diff --git a/src/components/search/style.css b/src/components/search/style.css new file mode 100644 index 0000000..b6b05f1 --- /dev/null +++ b/src/components/search/style.css @@ -0,0 +1,16 @@ +.searchbox{ + background-color: #f0fffae8; + display: flex; + padding: 30px 0px; + margin: 24px; + gap: 20px; + justify-content: center; + flex-wrap: wrap; +} +.searchbox .item{ + width: 20%; + max-width: 25%; +} +.searchbox_conatiner{ + max-width: none !important; +} \ No newline at end of file