Skip to content

Commit

Permalink
Add check at PluginActionForm as well
Browse files Browse the repository at this point in the history
  • Loading branch information
hetunandu committed Nov 22, 2024
1 parent 9107cdb commit 88d7be1
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
import React from "react";
import { Flex } from "@appsmith/ads";
import { Flex, Text } from "@appsmith/ads";
import { useChangeActionCall } from "./hooks/useChangeActionCall";
import { usePluginActionContext } from "../../PluginActionContext";
import { UIComponentTypes } from "api/PluginApi";
import APIEditorForm from "./components/ApiEditor";
import GraphQLEditorForm from "./components/GraphQLEditor";
import UQIEditorForm from "./components/UQIEditor";
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";
import { createMessage, UNEXPECTED_ERROR } from "ee/constants/messages";

const PluginActionForm = () => {
useChangeActionCall();
const { plugin } = usePluginActionContext();
const { editorConfig, plugin } = usePluginActionContext();

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

return (
<Flex flex="1" overflow="hidden" p="spaces-4" w="100%">
Expand Down

0 comments on commit 88d7be1

Please sign in to comment.