diff --git a/index.html b/index.html index 43b8678..e040f1d 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + Assignment-5 diff --git a/src/App.jsx b/src/App.jsx index 876cbe7..9471597 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -70,9 +70,15 @@ const App = () => {
- {filteredProducts?.map((product) => ( - - ))} + {filteredProducts && filteredProducts?.length > 0 ? ( + filteredProducts?.map((product) => ( + + )) + ) : ( +

+ No products available as per the requirement +

+ )}
diff --git a/src/assets/favicon.ico b/src/assets/favicon.ico new file mode 100644 index 0000000..7d41634 Binary files /dev/null and b/src/assets/favicon.ico differ diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..1158803 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/components/Navbar/index.jsx b/src/components/Navbar/index.jsx index d136b1f..f8e8d56 100644 --- a/src/components/Navbar/index.jsx +++ b/src/components/Navbar/index.jsx @@ -1,8 +1,12 @@ import { useContext, useState } from "react"; import { CartContext } from "../cartContext"; import Cart from "../cartProducts"; +import logo from "../../assets/logo.png"; const Navbar = () => { + const reloadPage = () => { + window.location.reload(false); + }; const { cartItems } = useContext(CartContext); const [showModal, setShowModal] = useState(false); @@ -13,17 +17,26 @@ const Navbar = () => { return (