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
8d6ed355
Commit
8d6ed355
authored
May 11, 2021
by
John Lam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add promotion imports and dependencies
parent
b5efca59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
PromotionsIndexComponent.jsx
src/component/promo_index/PromotionsIndexComponent.jsx
+4
-5
No files found.
src/component/promo_index/PromotionsIndexComponent.jsx
View file @
8d6ed355
...
...
@@ -2,7 +2,6 @@ import {useState, useEffect} from 'react';
import
Config
from
'../../config'
;
import
"./promolistStyle.css"
;
import
{
NavLink
}
from
'react-router-dom'
;
import
{
getAllProducts
}
from
"../../actions/apiRequests.js"
;
export
default
function
PromotionIndexComponent
()
{
...
...
@@ -17,6 +16,7 @@ export default function PromotionIndexComponent () {
const
response
=
await
fetch
(
`
${
Config
.
promotionsUrl
}
`
);
const
data
=
await
response
.
json
();
setPromoData
(
data
);
console
.
log
(
data
);
}
const
deletePromotion
=
(
promoId
)
=>
{
...
...
@@ -30,7 +30,6 @@ export default function PromotionIndexComponent () {
return
(
<
div
>
<
div
className=
"promo-container"
>
<
div
className=
"promo-list-container"
>
<
div
className=
"promo-header"
>
<
h1
className=
"promo-title"
>
Promotions
</
h1
>
...
...
@@ -60,7 +59,7 @@ export default function PromotionIndexComponent () {
</
tr
>
</
thead
>
<
tbody
>
{
promoData
.
map
((
promo
,
key
)
=>
{
{
promoData
.
length
>
0
&&
promoData
.
map
((
promo
,
key
)
=>
{
return
(
<
tr
key=
{
key
}
>
<
td
>
...
...
@@ -88,8 +87,8 @@ export default function PromotionIndexComponent () {
</
td
>
</
tr
>
)
}).
reverse
()
}
}).
reverse
()
}
</
tbody
>
</
table
>
</
div
>
...
...
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