Skip to content

Commit

Permalink
[DDW-1011] move news feed closing logic one level up the component tree
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnbusuttil committed Mar 18, 2022
1 parent d105ca6 commit e3068fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ class RedeemItnRewardsContainer extends Component<Props> {
};
}

componentDidMount() {
const { app } = this.props.stores;
const { closeNewsFeed } = this.props.actions.app;

if (app.newsFeedIsOpen) {
closeNewsFeed.trigger();
}
}

render() {
const { stores, actions } = this.props;
const { allWallets } = stores.wallets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ class Step1ConfigurationContainer extends Component<Props> {
return walletAmount && walletAmount.gte(minRewardsFunds);
};

componentDidMount() {
const { app } = this.props.stores;
const { closeNewsFeed } = this.props.actions.app;

if (app.newsFeedIsOpen) {
closeNewsFeed.trigger();
}
}

render() {
const { actions, stores, onBack, onClose } = this.props;
const { app, staking, wallets } = stores;
Expand Down

0 comments on commit e3068fa

Please sign in to comment.