From 0f0e5f7408969fcc4473746919bb0e8aaa89947c Mon Sep 17 00:00:00 2001
From: MikunoNaka <bokuwakanojogahoshii@yahoo.com>
Date: Sun, 8 Aug 2021 13:00:16 +0530
Subject: half-cleaned the way saving invoices works

---
 src/components/Menu/SubmitMenu.tsx | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

(limited to 'src/components/Menu/SubmitMenu.tsx')

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>
   );
-- 
cgit v1.2.3

