Skip to content

Commit

Permalink
adds dismiss functionality to info notification
Browse files Browse the repository at this point in the history
  • Loading branch information
comountainclimber committed Mar 8, 2019
1 parent 126673c commit c8af8af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/containers/TransactionHistory/TransactionHistory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ import { parseAbstractData } from '../../actions/transactionHistoryActions'
const { dialog } = require('electron').remote

type Props = {
showSuccessNotification: ({ message: string }) => void,
showErrorNotification: ({ message: string }) => void,
showInfoNotification: ({ message: string }) => void,
showSuccessNotification: ({ message: string }) => string,
showErrorNotification: ({ message: string }) => string,
showInfoNotification: ({ message: string }) => string,
hideNotification: string => void,
net: string,
address: string,
}
Expand Down Expand Up @@ -55,6 +56,7 @@ export default class TransactionHistory extends Component<Props> {
showErrorNotification,
showSuccessNotification,
showInfoNotification,
hideNotification,
net,
address,
} = this.props
Expand All @@ -71,7 +73,7 @@ export default class TransactionHistory extends Component<Props> {
try {
const parser = new Parser(fields)

showInfoNotification({
const infoNotification = showInfoNotification({
message: 'Fetching entire transaction history...',
})
const abstracts = []
Expand Down Expand Up @@ -103,6 +105,7 @@ export default class TransactionHistory extends Component<Props> {
return omitted
}),
)
hideNotification(infoNotification)
dialog.showSaveDialog(
{
filters: [
Expand Down
2 changes: 2 additions & 0 deletions app/containers/TransactionHistory/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ import {
showErrorNotification,
showSuccessNotification,
showInfoNotification,
hideNotification,
} from '../../modules/notifications'

const actionCreators = {
showErrorNotification,
showSuccessNotification,
showInfoNotification,
hideNotification,
}

const mapDispatchToProps = dispatch =>
Expand Down

0 comments on commit c8af8af

Please sign in to comment.