diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-06-25 15:27:58 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-06-25 15:27:58 +0530 |
commit | 35a44621c25b06471ae5b29bbdfb35fdcf652cf1 (patch) | |
tree | 377186f820685e9be05d60f0d7a2d8743a8b6a9c /src/components/Display | |
parent | 5d2222d9fa782b94ba6787e5c6b23aab1e468308 (diff) |
Changed the way all the values are calculated for stability
Diffstat (limited to 'src/components/Display')
-rw-r--r-- | src/components/Display/ItemsDisplay.js | 5 | ||||
-rw-r--r-- | src/components/Display/SummaryDisplay.txt (renamed from src/components/Display/SummaryDisplay.js) | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/components/Display/ItemsDisplay.js b/src/components/Display/ItemsDisplay.js index 0b2fbf0..f0882af 100644 --- a/src/components/Display/ItemsDisplay.js +++ b/src/components/Display/ItemsDisplay.js @@ -9,7 +9,7 @@ import React from "react"; import "./Display.scss"; import DisplayItem from "./DisplayItem"; -import {SummaryDisplayTR} from "./SummaryDisplay"; +// import {SummaryDisplayTR} from "./SummaryDisplay"; const ItemsDisplay = (props) => { const items = props.items; @@ -43,10 +43,11 @@ const ItemsDisplay = (props) => { } )} - <SummaryDisplayTR items={props.items}/> </tbody> </table> ); + // this goes right before </tbody> + //<SummaryDisplayTR items={props.items}/> } export default ItemsDisplay; diff --git a/src/components/Display/SummaryDisplay.js b/src/components/Display/SummaryDisplay.txt index 1bcc713..e06eac5 100644 --- a/src/components/Display/SummaryDisplay.js +++ b/src/components/Display/SummaryDisplay.txt @@ -9,6 +9,9 @@ import React from "react"; import "./Display.scss"; +interface props { +} + const getBasicSummary = (items) => { let totalRawPrice = 0; let totalQuantity = 0; @@ -63,7 +66,7 @@ const getFullSummary = (items) => { ); } -export const SummaryDisplayTR = (props) => { +export const SummaryDisplayTR: React.FC<props> = (props) => { const summary = getBasicSummary(props.items); return ( |