From 034a41ad44144e79c1c58a3b4f8741ddf8d56f8c Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Fri, 16 Apr 2021 18:40:50 +0530 Subject: implemented a way for AddNewItemForm and BillingPage to talk to each other and share data --- src/components/BillingPage.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/components/BillingPage.js') diff --git a/src/components/BillingPage.js b/src/components/BillingPage.js index f4b2b11..ca51651 100644 --- a/src/components/BillingPage.js +++ b/src/components/BillingPage.js @@ -21,13 +21,18 @@ const sampleData = [ } ]; +// called when AddNewItemForm is submitted +let addedItems = []; +const getAddedItems = (item) => { + addedItems.push(item); +} + +const defGSTValue = 18; + const BillingPage = () => { return ( <> - - - - + ); } -- cgit v1.2.3