perf(ee): code-split the Settings page away (#24993)
This commit is contained in:
parent
10b1081b7a
commit
b6dbe65e0b
|
|
@ -47,7 +47,7 @@ import UserProfile from "pages/UserProfile";
|
|||
import { getCurrentUser } from "actions/authActions";
|
||||
import { getCurrentUserLoading } from "selectors/usersSelectors";
|
||||
import Setup from "pages/setup";
|
||||
import Settings from "@appsmith/pages/AdminSettings";
|
||||
import SettingsLoader from "pages/Settings/loader";
|
||||
import SignupSuccess from "pages/setup/SignupSuccess";
|
||||
import type { ERROR_CODES } from "@appsmith/constants/ApiConstants";
|
||||
import TemplatesListLoader from "pages/Templates/loader";
|
||||
|
|
@ -101,7 +101,7 @@ export function Routes() {
|
|||
}
|
||||
/>
|
||||
<SentryRoute
|
||||
component={Settings}
|
||||
component={SettingsLoader}
|
||||
exact
|
||||
path={ADMIN_SETTINGS_CATEGORY_PATH}
|
||||
/>
|
||||
|
|
|
|||
22
app/client/src/pages/Settings/loader.tsx
Normal file
22
app/client/src/pages/Settings/loader.tsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import React from "react";
|
||||
import PageLoadingBar from "pages/common/PageLoadingBar";
|
||||
import { retryPromise } from "utils/AppsmithUtils";
|
||||
|
||||
const Page = React.lazy(() =>
|
||||
retryPromise(
|
||||
() =>
|
||||
import(
|
||||
/* webpackChunkName: "settings" */ "@appsmith/pages/AdminSettings/index"
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
const AdminSettingsLoader = (props: any) => {
|
||||
return (
|
||||
<React.Suspense fallback={<PageLoadingBar />}>
|
||||
<Page {...props} />
|
||||
</React.Suspense>
|
||||
);
|
||||
};
|
||||
|
||||
export default AdminSettingsLoader;
|
||||
Loading…
Reference in New Issue
Block a user