From e3068fa88a296aa26b14105d90add5ee8d0df108 Mon Sep 17 00:00:00 2001 From: shawnbusuttil Date: Fri, 18 Mar 2022 10:29:48 +0000 Subject: [PATCH] [DDW-1011] move news feed closing logic one level up the component tree --- .../app/containers/staking/RedeemItnRewardsContainer.tsx | 9 +++++++++ .../redeem-itn-rewards/Step1ConfigurationContainer.tsx | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/renderer/app/containers/staking/RedeemItnRewardsContainer.tsx b/source/renderer/app/containers/staking/RedeemItnRewardsContainer.tsx index 5a433a2a54..6c16fd19a6 100644 --- a/source/renderer/app/containers/staking/RedeemItnRewardsContainer.tsx +++ b/source/renderer/app/containers/staking/RedeemItnRewardsContainer.tsx @@ -27,6 +27,15 @@ class RedeemItnRewardsContainer extends Component { }; } + 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; diff --git a/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx b/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx index 492b7c7382..3a41d7f117 100644 --- a/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx +++ b/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx @@ -41,15 +41,6 @@ class Step1ConfigurationContainer extends Component { 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;