Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/client/src/PluginActionEditor/PluginActionContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import type { ActionResponse } from "api/ActionAPI";
interface PluginActionContextType {
action: Action;
actionResponse?: ActionResponse;
editorConfig: unknown[];
settingsConfig: unknown[];
editorConfig?: unknown[];
settingsConfig?: unknown[];
plugin: Plugin;
datasource?: EmbeddedRestDatasource | Datasource;
}
Expand Down
10 changes: 0 additions & 10 deletions app/client/src/PluginActionEditor/PluginActionEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ const PluginActionEditor = (props: ChildrenProps) => {
);
}

if (!settingsConfig || !editorConfig) {
return (
<CenteredWrapper>
<Text color="var(--ads-v2-color-fg-error)" kind="heading-m">
Editor config not found!
</Text>
</CenteredWrapper>
);
}

const actionResponse = actionResponses[action.id];

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import {
import { isValidFormConfig } from "reducers/evaluationReducers/formEvaluationReducer";
import FormControl from "pages/Editor/FormControl";
import type { ControlProps } from "components/formControls/BaseControl";
import { Spinner } from "@appsmith/ads";
import { Spinner, Text } from "@appsmith/ads";
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";
import type { QueryAction, SaaSAction } from "entities/Action";
import { Section, Zone } from "../ActionForm";

Expand Down Expand Up @@ -265,7 +266,13 @@ const FormRender = (props: Props) => {
};

if (!editorConfig || editorConfig.length < 0) {
return <ErrorComponent errorMessage={createMessage(UNEXPECTED_ERROR)} />;
return (
<CenteredWrapper>
<Text color="var(--ads-v2-color-fg-error)" kind="heading-m">
{createMessage(UNEXPECTED_ERROR)}
</Text>
</CenteredWrapper>
);
}

return renderConfig();
Expand Down
9 changes: 6 additions & 3 deletions app/client/src/pages/Editor/ActionSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import log from "loglevel";
import type { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig";
import styled from "styled-components";
import { Text } from "@appsmith/ads";
import CenteredWrapper from "../../components/designSystems/appsmith/CenteredWrapper";

interface ActionSettingsProps {
// TODO: Fix this the next time the file is edited
Expand Down Expand Up @@ -43,9 +44,11 @@ function ActionSettings(props: ActionSettingsProps): JSX.Element {
return (
<ActionSettingsWrapper>
{!props.actionSettingsConfig ? (
<Text color="var(--ads-v2-color-fg-error)" kind="heading-m">
Error: No settings config found
</Text>
<CenteredWrapper>
<Text color="var(--ads-v2-color-fg-error)" kind="heading-m">
Error: No settings config found
</Text>
</CenteredWrapper>
) : (
/* TODO: Fix this the next time the file is edited */
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
Expand Down