diff options
Diffstat (limited to 'src/components/Display/SummaryDisplay.js')
-rw-r--r-- | src/components/Display/SummaryDisplay.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/Display/SummaryDisplay.js b/src/components/Display/SummaryDisplay.js index 8acddc9..ebc382c 100644 --- a/src/components/Display/SummaryDisplay.js +++ b/src/components/Display/SummaryDisplay.js @@ -4,6 +4,7 @@ import "./Display.css"; const getSummary = (items) => { let totalRawPrice = 0; let totalQuantity = 0; + for (let i = 0; i < items.length; i++) { totalRawPrice += items[i].Price; totalQuantity += items[i].Quantity @@ -19,17 +20,16 @@ const getSummary = (items) => { const SummaryDisplayTR = (props) => { const summary = getSummary(props.items); - console.log(summary) return ( - <tr> + <tr className={"SummaryDisplayTR"}> <td>Total</td> - <td className={"altBorder"}></td> - <td className={"altBorder"}></td> + <td className={"disabledBorder"}></td> + <td className={"disabledBorder"}></td> <td>{summary.TotalQuantity}</td> + <td className={"disabledBorder"}></td> + <td className={"disabledBorder"}></td> <td>{summary.TotalRawPrice}</td> - <td className={"altBorder"}></td> - <td className={"altBorder"}></td> </tr> ); } |