From a5528f2092098a224a6e78199c80e4cb6a21995f Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Fri, 30 Apr 2021 08:39:53 +0530 Subject: updating the items list on runtime + fixed at least 3 bugs emerged due to that --- src/components/BillingPage.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/components/BillingPage.js') diff --git a/src/components/BillingPage.js b/src/components/BillingPage.js index c2aa158..0542d2e 100644 --- a/src/components/BillingPage.js +++ b/src/components/BillingPage.js @@ -13,10 +13,9 @@ import AddNewItemForm from "./Form/AddNewItemForm"; import RegisterItemForm from "./Form/RegisterItemForm"; import MetaInfoForm from "./Form/MetaInfoForm"; import ItemsDisplay from "./Display/ItemsDisplay"; -import SummaryDisplay from "./Display/SummaryDisplay"; - -const BillingPage = () => { +import SummaryDisplay from "./Display/SummaryDisplay"; const BillingPage = () => { const [savedItems, getSavedItems] = useState([]); + const [registerFormVisibility, setRegisterFormVisibility] = useState(false); const getRegisteredItems = () => { axios.get(`/api/items`) @@ -46,8 +45,18 @@ const BillingPage = () => { return ( <> - - + + + { registerFormVisibility && + + } +
-- cgit v1.2.3