navigate("/Inventory")}
name="Inventory"
diff --git a/src/routes/Products/Products.tsx b/src/routes/Products/Products.tsx
index 8db92ee..a3c1d07 100644
--- a/src/routes/Products/Products.tsx
+++ b/src/routes/Products/Products.tsx
@@ -1,13 +1,12 @@
import React from "react";
import styles from "../../styles";
+import { useNavigate } from "react-router-dom";
import ProductsIcon from "../../Components/Icons/ProductsIcon/ProductsIcon";
import ProductInfo from "../../Components/ProductInfo/ProductInfo";
import ProductsLists from "../../Components/ProductsLists/ProductsLists";
export default function Products() {
- const handleAddProduct = () => {
- window.location.href = "/Products/AddProduct";
- };
+ const navigate = useNavigate();
return (
@@ -16,7 +15,7 @@ export default function Products() {
Products
-
+
);
}