2020-08-03 14:18:48 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import PageLoadingBar from "pages/common/PageLoadingBar";
|
2020-09-15 06:59:58 +00:00
|
|
|
import { retryPromise } from "utils/AppsmithUtils";
|
2020-09-28 06:29:41 +00:00
|
|
|
import PerformanceTracker, {
|
|
|
|
|
PerformanceTransactionName,
|
|
|
|
|
} from "utils/PerformanceTracker";
|
2020-10-07 11:19:56 +00:00
|
|
|
import AnalyticsUtil from "utils/AnalyticsUtil";
|
2020-08-03 14:18:48 +00:00
|
|
|
|
|
|
|
|
class ApplicationListLoader extends React.PureComponent<any, { Page: any }> {
|
|
|
|
|
constructor(props: any) {
|
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
|
Page: null,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
2020-09-28 06:29:41 +00:00
|
|
|
PerformanceTracker.stopTracking(PerformanceTransactionName.LOGIN_CLICK);
|
2020-10-07 11:19:56 +00:00
|
|
|
AnalyticsUtil.logEvent("APPLICATIONS_PAGE_LOAD");
|
2020-09-15 06:59:58 +00:00
|
|
|
retryPromise(() =>
|
2023-01-10 05:39:15 +00:00
|
|
|
import(
|
|
|
|
|
/* webpackChunkName: "applications" */ "@appsmith/pages/Applications/index"
|
|
|
|
|
),
|
2020-12-24 04:32:25 +00:00
|
|
|
).then((module) => {
|
2020-08-03 14:18:48 +00:00
|
|
|
this.setState({ Page: module.default });
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const { Page } = this.state;
|
|
|
|
|
|
|
|
|
|
return Page ? <Page {...this.props} /> : <PageLoadingBar />;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default ApplicationListLoader;
|