@@ -36,7 +36,6 @@ import { Redirect, Router, Switch } from "react-router-dom";
36
36
import type { AppState } from "redux/reducers" ;
37
37
import { fetchConfigAction } from "redux/reduxActions/configActions" ;
38
38
import { fetchUserAction } from "redux/reduxActions/userActions" ;
39
- import { fetchSubscriptionsAction } from "redux/reduxActions/subscriptionActions" ;
40
39
import { reduxStore } from "redux/store/store" ;
41
40
import { developEnv } from "util/envUtils" ;
42
41
import history from "util/history" ;
@@ -90,7 +89,6 @@ type AppIndexProps = {
90
89
fetchHomeDataFinished : boolean ;
91
90
fetchConfig : ( orgId ?: string ) => void ;
92
91
fetchHomeData : ( currentUserAnonymous ?: boolean | undefined ) => void ;
93
- fetchSubscriptions : ( ) => void ;
94
92
getCurrentUser : ( ) => void ;
95
93
favicon : string ;
96
94
brandName : string ;
@@ -113,7 +111,6 @@ class AppIndex extends React.Component<AppIndexProps, any> {
113
111
this . props . fetchConfig ( this . props . currentOrgId ) ;
114
112
if ( ! this . props . currentUserAnonymous ) {
115
113
this . props . fetchHomeData ( this . props . currentUserAnonymous ) ;
116
- this . props . fetchSubscriptions ( ) ;
117
114
}
118
115
}
119
116
}
@@ -420,19 +417,8 @@ const mapDispatchToProps = (dispatch: any) => ({
420
417
} ,
421
418
fetchConfig : ( orgId ?: string ) => dispatch ( fetchConfigAction ( orgId ) ) ,
422
419
423
- fetchSubscriptions : ( ) => {
424
- // dispatch(fetchSubscriptionsAction());
425
- } ,
426
-
427
420
fetchHomeData : ( currentUserAnonymous : boolean | undefined ) => {
428
421
dispatch ( fetchHomeData ( { } ) ) ;
429
- // the rule should be that if the user is not logged in and if he want to view an App, we should not fetch the home data
430
- /* if (window.location.pathname == APP_EDITOR_URL && !currentUserAnonymous && !currentUserAnonymous === undefined) {
431
- dispatch(fetchHomeData({}));
432
- }
433
- else {
434
- dispatch(fetchHomeData({}));
435
- } */
436
422
}
437
423
} ) ;
438
424
0 commit comments