## Description Since Usage & Billing is EE only, there are a few components which needs to be code splitted. So code splitted those files and also added feature flag for Usage & Billing. TL;DR Code split usage and billing files Fixes [#146](https://github.com/appsmithorg/cloud-services/issues/146) ## Type of change > Please delete options that are not relevant. - Code splitting ## How Has This Been Tested? - Manual ## Checklist: ### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [ ] Added Test Plan Approved label after reveiwing all Cypress test
38 lines
982 B
TypeScript
38 lines
982 B
TypeScript
import React from "react";
|
|
import PageLoadingBar from "pages/common/PageLoadingBar";
|
|
import { retryPromise } from "utils/AppsmithUtils";
|
|
import PerformanceTracker, {
|
|
PerformanceTransactionName,
|
|
} from "utils/PerformanceTracker";
|
|
import AnalyticsUtil from "utils/AnalyticsUtil";
|
|
|
|
class ApplicationListLoader extends React.PureComponent<any, { Page: any }> {
|
|
constructor(props: any) {
|
|
super(props);
|
|
|
|
this.state = {
|
|
Page: null,
|
|
};
|
|
}
|
|
|
|
componentDidMount() {
|
|
PerformanceTracker.stopTracking(PerformanceTransactionName.LOGIN_CLICK);
|
|
AnalyticsUtil.logEvent("APPLICATIONS_PAGE_LOAD");
|
|
retryPromise(() =>
|
|
import(
|
|
/* webpackChunkName: "applications" */ "@appsmith/pages/Applications/index"
|
|
),
|
|
).then((module) => {
|
|
this.setState({ Page: module.default });
|
|
});
|
|
}
|
|
|
|
render() {
|
|
const { Page } = this.state;
|
|
|
|
return Page ? <Page {...this.props} /> : <PageLoadingBar />;
|
|
}
|
|
}
|
|
|
|
export default ApplicationListLoader;
|