@@ -39,12 +39,12 @@ function mapStateToProps(state) {
3939 walletPaymentAddressUrl : state . settings . api . walletPaymentAddressUrl ,
4040 coreAPIPassword : state . settings . api . coreAPIPassword ,
4141 instanceIdentifier : state . apps . instanceIdentifier ,
42- lastUpdatedApps : selectLastUpdatedApps ( state )
42+ lastUpdatedApps : selectLastUpdatedApps ( state ) ,
43+ topApps : state . apps . topApps
4344 }
4445}
4546
46- const mapDispatchToProps = dispatch => {
47- return bindActionCreators (
47+ const mapDispatchToProps = dispatch => bindActionCreators (
4848 {
4949 updateApi : SettingsActions . updateApi ,
5050 isCoreRunning : SanityActions . isCoreRunning ,
@@ -54,7 +54,6 @@ const mapDispatchToProps = dispatch => {
5454 } ,
5555 dispatch
5656 )
57- }
5857
5958class AppContainer extends Component {
6059 static propTypes = {
@@ -80,7 +79,8 @@ class AppContainer extends Component {
8079 router : PropTypes . object . isRequired ,
8180 location : PropTypes . object . isRequired ,
8281 instanceIdentifier : PropTypes . string ,
83- lastUpdatedApps : PropTypes . number
82+ lastUpdatedApps : PropTypes . number ,
83+ topApps : PropTypes . array
8484 }
8585
8686 constructor ( props ) {
@@ -166,7 +166,7 @@ class AppContainer extends Component {
166166 }
167167
168168 if (
169- ! this . props . lastUpdatedApps ||
169+ ! this . props . lastUpdatedApps || ! this . props . topApps ||
170170 Date . now ( ) - this . props . lastUpdatedApps > 900000 // 15 min
171171 ) {
172172 // Fetch those apps if data is state
0 commit comments