diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-08-08 13:00:16 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-08-08 13:00:16 +0530 |
commit | 0f0e5f7408969fcc4473746919bb0e8aaa89947c (patch) | |
tree | 0e5119e9bd8c021aceea9d79a9e5d58040480608 /src/components/Menu | |
parent | 6baad020ce5037a90d902c8f41f1f37f52419a10 (diff) |
half-cleaned the way saving invoices works
Diffstat (limited to 'src/components/Menu')
-rw-r--r-- | src/components/Menu/SubmitMenu.tsx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/components/Menu/SubmitMenu.tsx b/src/components/Menu/SubmitMenu.tsx index 599b181..649b49d 100644 --- a/src/components/Menu/SubmitMenu.tsx +++ b/src/components/Menu/SubmitMenu.tsx @@ -6,16 +6,16 @@ * Copyright (c) 2021 Vidhu Kant Sharma */ -import React, { useState, Dispatch, SetStateAction } from "react"; -import { PDFViewer } from '@react-pdf/renderer'; -import PrintableDoc from "./../Print/PrintableDoc"; +import React, { Dispatch, SetStateAction } from "react"; +import { Transport, Item } from "./../../interfaces"; interface Props { setVisibility: Dispatch<SetStateAction<boolean>> // this component's visibility + transporter: Transport + items: Item[] } const TransportForm: React.FC<Props> = (props) => { - const [showPDF, setShowPDF] = useState<boolean>(false); const hideSelf = () => props.setVisibility(false); @@ -24,13 +24,7 @@ const TransportForm: React.FC<Props> = (props) => { return ( <div className={"floatingMenuBG"} onClick={closeOnBGClicked}> - {showPDF && - <PDFViewer className={"PDFViewer"}> - <PrintableDoc/> - </PDFViewer> - } - <div className={"smallFloatingMenu TransportForm"} /*onSubmit={handleSubmit}*/> - <button onClick={() => setShowPDF(true)}>Generate PDF</button> + <div className={"smallFloatingMenu TransportForm"}> </div> </div> ); |