diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-08-29 10:28:10 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-08-29 10:28:10 +0530 |
commit | 12fa58555681257384150383b4e83c572d19fec9 (patch) | |
tree | 43821b58a0305ec34edceede4c393b0d9d50b2a2 /src/components/Display | |
parent | 97d32bb98dd669d6ef934036cbf8d4278de0b481 (diff) |
Moved submit button to SummaryDisplay
Diffstat (limited to 'src/components/Display')
-rw-r--r-- | src/components/Display/SummaryDisplay.tsx | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/src/components/Display/SummaryDisplay.tsx b/src/components/Display/SummaryDisplay.tsx index 22f2e52..5d1589e 100644 --- a/src/components/Display/SummaryDisplay.tsx +++ b/src/components/Display/SummaryDisplay.tsx @@ -6,12 +6,13 @@ * Copyright (c) 2021 Vidhu Kant Sharma */ -import React from "react"; +import React, {Dispatch, SetStateAction} from "react"; import { Item } from "./../../interfaces" import "./Display.scss"; interface props { items: Item[] + setShowSubmitMenu: Dispatch<SetStateAction<boolean>> } interface FullSummary { @@ -51,25 +52,6 @@ const getFullSummary = (items: Item[]): FullSummary => { } } -// export const SummaryDisplayTR: React.FC<props> = (props) => { -// const summary = getBasicSummary(props.items); -// -// return ( -// <tr className={"SummaryDisplayTR"}> -// <td>Total</td> -// <td className={"disabledBorder"}></td> -// <td className={"disabledBorder"}></td> -// <td>{summary.TotalQuantity}</td> -// <td className={"disabledBorder"}></td> -// <td className={"disabledBorder"}></td> -// <td className={"disabledBorder"}></td> -// <td className={"disabledBorder"}></td> -// <td className={"disabledBorder"}></td> -// <td>{summary.TotalRawPrice}</td> -// </tr> -// ); -// } - const SummaryDisplay: React.FC<props> = (props) => { const summary: FullSummary = getFullSummary(props.items); return ( @@ -109,6 +91,10 @@ const SummaryDisplay: React.FC<props> = (props) => { </tr> </tbody> </table> + + <button onClick={() => props.setShowSubmitMenu(true)}> + Submit + </button> </div> ); } |