Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
inventory-promotion-react
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ascend
inventory-promotion-react
Commits
704e3419
Commit
704e3419
authored
May 10, 2021
by
Ben Anderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added link to new product form in products page header
parent
af70a1fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
Main.jsx
src/component/Main.jsx
+3
-1
ProductGrid.jsx
src/component/ProductGrid.jsx
+10
-4
No files found.
src/component/Main.jsx
View file @
704e3419
...
@@ -37,7 +37,9 @@ export default function Main() {
...
@@ -37,7 +37,9 @@ export default function Main() {
<
AuthRoute
exact
path=
"/"
>
<
AuthRoute
exact
path=
"/"
>
<
Redirect
to=
"/products"
/>
<
Redirect
to=
"/products"
/>
</
AuthRoute
>
</
AuthRoute
>
<
AuthRoute
>
404 PAGE
</
AuthRoute
>
<
AuthRoute
>
<
h1
>
404 Page Not Found
</
h1
>
</
AuthRoute
>
</
Switch
>
</
Switch
>
</
div
>
</
div
>
);
);
...
...
src/component/ProductGrid.jsx
View file @
704e3419
...
@@ -3,7 +3,8 @@ import Product from "./Product.jsx";
...
@@ -3,7 +3,8 @@ import Product from "./Product.jsx";
import
{
Col
,
Container
,
Row
}
from
"react-bootstrap"
;
import
{
Col
,
Container
,
Row
}
from
"react-bootstrap"
;
import
"./../styles/ProductGrid.css"
;
import
"./../styles/ProductGrid.css"
;
import
Config
from
"../config.js"
;
import
Config
from
"../config.js"
;
import
{
set
}
from
"react-hook-form"
;
import
{
Link
}
from
"react-router-dom"
;
export
default
function
ProductGrid
({
productData
})
{
export
default
function
ProductGrid
({
productData
})
{
const
[
products
,
setProducts
]
=
useState
([]);
const
[
products
,
setProducts
]
=
useState
([]);
...
@@ -19,9 +20,14 @@ export default function ProductGrid({ productData }) {
...
@@ -19,9 +20,14 @@ export default function ProductGrid({ productData }) {
return
(
return
(
<
div
>
<
div
>
<
h1
id=
"title"
className=
"text-center"
>
<
div
className=
"container mt-3 d-flex justify-content-between align-items-center"
>
Inventory
<
h1
id=
"title"
className=
"text-center"
>
</
h1
>
Inventory
</
h1
>
<
Link
type=
"link"
className=
"btn btn-success"
to=
"/products/new"
>
+ New Product
</
Link
>
</
div
>
<
Container
id=
"prod-grid"
className=
"mt-3"
>
<
Container
id=
"prod-grid"
className=
"mt-3"
>
<
Row
xs=
{
1
}
sm=
{
2
}
md=
{
3
}
lg=
{
4
}
>
<
Row
xs=
{
1
}
sm=
{
2
}
md=
{
3
}
lg=
{
4
}
>
{
products
.
map
((
product
)
=>
{
{
products
.
map
((
product
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment