aboutsummaryrefslogtreecommitdiff
path: root/src/components/BillingPage.js
blob: ca51651a234f4383eb258567fa82b9b70910fbf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from "react";
import AddNewItemForm from "./Form/AddNewItemForm.js";


const sampleData = [
  {
    "Model": "Kisan Chair",
    "Description": "Very good chair",
    "Price": 10000,
    "Discount": 0
  }, {
    "Model": "Supreme Chair",
    "Description": "Even better chair",
    "Price": "2134983",
    "Discount": 0
  }, {
    "Model": "Action Houseware",
    "Description": "Not a chair",
    "Price": 69,
    "Discount": 0
  }
];

// called when AddNewItemForm is submitted
let addedItems = [];
const getAddedItems = (item) => {
  addedItems.push(item);
}

const defGSTValue = 18;

const BillingPage = () => {
  return (
    <>
      <AddNewItemForm savedItems={sampleData} addItem={getAddedItems} defGSTValue={defGSTValue}/>
    </>
  );
}

export default BillingPage;