naa ra diay HAHAHAHA

This commit is contained in:
jurenroy 2023-02-27 12:44:15 +08:00
parent 151231ae1a
commit a21adacab1
2 changed files with 3 additions and 11 deletions

View file

@ -46,13 +46,6 @@ export default function Sidebar() {
<ProductsIcon size={4} color="white" />
</SidebarButton>
<SidebarButton
onClick={() => navigate("/Products/AddProduct")}
name="Add Product"
>
<ProductsIcon size={4} color="white" />
</SidebarButton>
<SidebarButton
onClick={() => navigate("/Inventory")}
name="Inventory"

View file

@ -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 (
<div style={{ margin: 32, height: "100%" }}>
@ -16,7 +15,7 @@ export default function Products() {
<h1 style={styles.text_large}>Products</h1>
</div>
<ProductInfo products={ProductsLists} />
<button onClick={handleAddProduct}>Add Product</button>
<button onClick={() => navigate("/Products/AddProduct")}>Add Product</button>
</div>
);
}