From 8d09ab297bd9608959e389db167d01baae4948c6 Mon Sep 17 00:00:00 2001 From: Ayush Pahwa Date: Mon, 19 Dec 2022 19:10:49 +0700 Subject: [PATCH] chore: CE EE split of routes for manage env pages (#18449) update: routes for CE EE split env editing --- app/client/src/ce/pages/routes.tsx | 9 +++++++++ app/client/src/ee/pages/routes.tsx | 1 + app/client/src/pages/Editor/routes.tsx | 16 +++++++++------- 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 app/client/src/ce/pages/routes.tsx create mode 100644 app/client/src/ee/pages/routes.tsx diff --git a/app/client/src/ce/pages/routes.tsx b/app/client/src/ce/pages/routes.tsx new file mode 100644 index 0000000000..5bd4a5ebad --- /dev/null +++ b/app/client/src/ce/pages/routes.tsx @@ -0,0 +1,9 @@ +import { DATA_SOURCES_EDITOR_ID_PATH } from "constants/routes"; +import DataSourceEditor from "pages/Editor/DataSourceEditor"; + +export const DatasourceEditorRoutes = [ + { + path: DATA_SOURCES_EDITOR_ID_PATH, + component: DataSourceEditor, + }, +]; diff --git a/app/client/src/ee/pages/routes.tsx b/app/client/src/ee/pages/routes.tsx new file mode 100644 index 0000000000..83765bc1ac --- /dev/null +++ b/app/client/src/ee/pages/routes.tsx @@ -0,0 +1 @@ +export * from "ce/pages/routes"; diff --git a/app/client/src/pages/Editor/routes.tsx b/app/client/src/pages/Editor/routes.tsx index ddc4e496a6..eb9457fa90 100644 --- a/app/client/src/pages/Editor/routes.tsx +++ b/app/client/src/pages/Editor/routes.tsx @@ -4,7 +4,6 @@ import { useLocation, useRouteMatch } from "react-router"; import ApiEditor from "./APIEditor"; import IntegrationEditor from "./IntegrationEditor"; import QueryEditor from "./QueryEditor"; -import DataSourceEditor from "./DataSourceEditor"; import JSEditor from "./JSEditor"; import GeneratePage from "./GeneratePage"; import CurlImportForm from "./APIEditor/CurlImportForm"; @@ -16,7 +15,6 @@ import { JS_COLLECTION_EDITOR_PATH, JS_COLLECTION_ID_PATH, CURL_IMPORT_PAGE_PATH, - DATA_SOURCES_EDITOR_ID_PATH, PROVIDER_TEMPLATE_PATH, GENERATE_TEMPLATE_FORM_PATH, matchBuilderPath, @@ -37,6 +35,7 @@ import { builderURL } from "RouteBuilder"; import history from "utils/history"; import OnboardingChecklist from "./FirstTimeUserOnboarding/Checklist"; import { getCurrentPageId } from "selectors/editorSelectors"; +import { DatasourceEditorRoutes } from "@appsmith/pages/routes"; const Wrapper = styled.div<{ isVisible: boolean }>` position: absolute; @@ -137,11 +136,14 @@ function EditorsRouter() { path={`${path}${childPath}`} /> ))} - + {DatasourceEditorRoutes.map(({ component, path: childPath }) => ( + + ))}