Commit 704e3419 authored by Ben Anderson's avatar Ben Anderson

Added link to new product form in products page header

parent af70a1fa
......@@ -37,7 +37,9 @@ export default function Main() {
<AuthRoute exact path="/">
<Redirect to="/products" />
</AuthRoute>
<AuthRoute>404 PAGE</AuthRoute>
<AuthRoute>
<h1>404 Page Not Found</h1>
</AuthRoute>
</Switch>
</div>
);
......
......@@ -3,7 +3,8 @@ import Product from "./Product.jsx";
import { Col, Container, Row } from "react-bootstrap";
import "./../styles/ProductGrid.css";
import Config from "../config.js";
import { set } from "react-hook-form";
import { Link } from "react-router-dom";
export default function ProductGrid({ productData }) {
const [products, setProducts] = useState([]);
......@@ -19,9 +20,14 @@ export default function ProductGrid({ productData }) {
return (
<div>
<div className="container mt-3 d-flex justify-content-between align-items-center">
<h1 id="title" className="text-center">
Inventory
</h1>
<Link type="link" className="btn btn-success" to="/products/new">
+ New Product
</Link>
</div>
<Container id="prod-grid" className="mt-3">
<Row xs={1} sm={2} md={3} lg={4}>
{products.map((product) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment