Skip to content

Commit e3068fa

Browse files
committed
[DDW-1011] move news feed closing logic one level up the component tree
1 parent d105ca6 commit e3068fa

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

source/renderer/app/containers/staking/RedeemItnRewardsContainer.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ class RedeemItnRewardsContainer extends Component<Props> {
2727
};
2828
}
2929

30+
componentDidMount() {
31+
const { app } = this.props.stores;
32+
const { closeNewsFeed } = this.props.actions.app;
33+
34+
if (app.newsFeedIsOpen) {
35+
closeNewsFeed.trigger();
36+
}
37+
}
38+
3039
render() {
3140
const { stores, actions } = this.props;
3241
const { allWallets } = stores.wallets;

source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ class Step1ConfigurationContainer extends Component<Props> {
4141
return walletAmount && walletAmount.gte(minRewardsFunds);
4242
};
4343

44-
componentDidMount() {
45-
const { app } = this.props.stores;
46-
const { closeNewsFeed } = this.props.actions.app;
47-
48-
if (app.newsFeedIsOpen) {
49-
closeNewsFeed.trigger();
50-
}
51-
}
52-
5344
render() {
5445
const { actions, stores, onBack, onClose } = this.props;
5546
const { app, staking, wallets } = stores;

0 commit comments

Comments
 (0)