Skip to content

Commit

Permalink
Merge pull request #7615 from brave/ksmith-rewards-report-drop-down
Browse files Browse the repository at this point in the history
Fix rewards monthly report drop-down not updating
  • Loading branch information
zenparsing authored Jan 19, 2021
2 parents 4247b2f + 151ba1c commit 09d9bed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,10 @@ class PageWallet extends React.Component<Props, State> {
getMonthlyReportDropDown = (): Record<string, string> => {
const { monthlyReportIds } = this.props.rewardsData

let ids = monthlyReportIds
if (!monthlyReportIds) {
ids = []
ids.push(`${new Date().getFullYear()}_${new Date().getMonth() + 1}`)
}
const ids = [
...monthlyReportIds || [],
`${new Date().getFullYear()}_${new Date().getMonth() + 1}`
]

let result: Record<string, string> = {}
ids.forEach((id: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export default class ModalActivity extends React.PureComponent<Props, State> {
return
}

this.setState({ currentMonth: value })
this.props.onMonthChange(value, child)
}

Expand Down

0 comments on commit 09d9bed

Please sign in to comment.