diff --git a/app/client/src/IDE/hooks/index.ts b/app/client/src/IDE/hooks/index.ts index 50897137a667..8fe85b2a9d84 100644 --- a/app/client/src/IDE/hooks/index.ts +++ b/app/client/src/IDE/hooks/index.ts @@ -1 +1,2 @@ export { useIsInSideBySideEditor } from "./useIsInSideBySideEditor"; +export { useIsEditorInitialised } from "ee/IDE/hooks/useIsEditorInitialised"; diff --git a/app/client/src/PluginActionEditor/PluginActionEditor.tsx b/app/client/src/PluginActionEditor/PluginActionEditor.tsx index bfdad62b30b7..40470b7bd837 100644 --- a/app/client/src/PluginActionEditor/PluginActionEditor.tsx +++ b/app/client/src/PluginActionEditor/PluginActionEditor.tsx @@ -12,10 +12,10 @@ import { import { PluginActionContextProvider } from "./PluginActionContext"; import { get } from "lodash"; import EntityNotFoundPane from "pages/Editor/EntityNotFoundPane"; -import { getIsEditorInitialized } from "selectors/editorSelectors"; import Spinner from "components/editorComponents/Spinner"; import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper"; import { Text } from "@appsmith/ads"; +import { useIsEditorInitialised } from "IDE/hooks"; interface ChildrenProps { children: React.ReactNode | React.ReactNode[]; @@ -24,7 +24,7 @@ interface ChildrenProps { const PluginActionEditor = (props: ChildrenProps) => { const { pathname } = useLocation(); - const isEditorInitialized = useSelector(getIsEditorInitialized); + const isEditorInitialized = useIsEditorInitialised(); const entity = identifyEntityFromPath(pathname); const action = useSelector((state) => getActionByBaseId(state, entity.id)); diff --git a/app/client/src/ce/IDE/hooks/useIsEditorInitialised.ts b/app/client/src/ce/IDE/hooks/useIsEditorInitialised.ts new file mode 100644 index 000000000000..bff2ec9d4cb2 --- /dev/null +++ b/app/client/src/ce/IDE/hooks/useIsEditorInitialised.ts @@ -0,0 +1,8 @@ +import { useSelector } from "react-redux"; +import { getIsEditorInitialized } from "selectors/editorSelectors"; + +function useIsEditorInitialised() { + return useSelector(getIsEditorInitialized); +} + +export { useIsEditorInitialised }; diff --git a/app/client/src/ee/IDE/hooks/useIsEditorInitialised.ts b/app/client/src/ee/IDE/hooks/useIsEditorInitialised.ts new file mode 100644 index 000000000000..a607c1438b56 --- /dev/null +++ b/app/client/src/ee/IDE/hooks/useIsEditorInitialised.ts @@ -0,0 +1 @@ +export { useIsEditorInitialised } from "ce/IDE/hooks/useIsEditorInitialised";