File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
apps/etherscan/src/app/views Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { Receipt } from "../types"
66import { AppContext } from "../AppContext"
77import { SubmitButton } from "../components"
88import { Navigate } from "react-router-dom"
9+ import { Button } from "react-bootstrap"
910
1011interface FormValues {
1112 receiptGuid : string
@@ -47,7 +48,7 @@ export const ReceiptsView: React.FC = () => {
4748
4849 return (
4950 < AppContext . Consumer >
50- { ( { apiKey, clientInstance, receipts } ) => {
51+ { ( { apiKey, clientInstance, receipts, setReceipts } ) => {
5152 if ( ! apiKey && clientInstance && clientInstance . call ) clientInstance . call ( 'notification' as any , 'toast' , 'Please add API key to continue' )
5253 return ! apiKey ? (
5354 < Navigate
@@ -108,6 +109,7 @@ export const ReceiptsView: React.FC = () => {
108109 />
109110
110111 < ReceiptsTable receipts = { receipts } />
112+ < Button title = "Clear the list of receipt" onClick = { ( ) => { setReceipts ( [ ] ) } } > Clear</ Button >
111113 </ div >
112114 )
113115 }
You can’t perform that action at this time.
0 commit comments