Created
January 26, 2020 20:01
-
-
Save Tiagoperes/1ff1d64031386d6882bacdd91798aa96 to your computer and use it in GitHub Desktop.
Exemplo usando props
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react' | |
| import YearMonthSelector from './YearMonthSelector' | |
| import InvoiceResult from './InvoiceResult' | |
| import InvoiceDispute from './InvoiceDispute' | |
| const Invoice = () => { | |
| const [year, setYear] = useState() | |
| const [month, setMonth] = useState() | |
| const [refetchInvoice, setRefetchInvoice] = useState() | |
| const [selectedItem, setselectedItem] = useState() | |
| return ( | |
| <> | |
| <YearMonthSelector year={year} month={month} setYear={setYear} setMonth={setMonth} /> | |
| <InvoiceResult | |
| year={year} | |
| month={month} | |
| refetchInvoice={refetchInvoice} | |
| setRefetchInvoice={setRefetchInvoice} | |
| selectedItem={selectedItem} | |
| setselectedItem={setselectedItem} | |
| /> | |
| <InvoiceDispute invoiceEntry={selectedItem} onSubmit={() => setRefetchInvoice(true)} /> | |
| </> | |
| ) | |
| } | |
| export default Invoice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment