From 570bbb06d25170f487c11001f9520a9c6cb8c5f5 Mon Sep 17 00:00:00 2001 From: gokhangunduz Date: Tue, 31 Oct 2023 13:58:22 +0300 Subject: [PATCH] refactor(create-forms): :tada: update create forms --- .../CFWorkspacesMapper.tsx} | 6 ++-- .../CreateForms/CreateRobotFormStep2.tsx | 30 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) rename src/components/{CFWorkspaces/CFWorkspaces.tsx => CFWorkspacesMapper/CFWorkspacesMapper.tsx} (91%) diff --git a/src/components/CFWorkspaces/CFWorkspaces.tsx b/src/components/CFWorkspacesMapper/CFWorkspacesMapper.tsx similarity index 91% rename from src/components/CFWorkspaces/CFWorkspaces.tsx rename to src/components/CFWorkspacesMapper/CFWorkspacesMapper.tsx index ea980552..60336f1e 100644 --- a/src/components/CFWorkspaces/CFWorkspaces.tsx +++ b/src/components/CFWorkspacesMapper/CFWorkspacesMapper.tsx @@ -7,17 +7,17 @@ import { IRobotWorkspaces, } from "../../interfaces/robotInterfaces"; -interface ICFWorkspaces { +interface ICFWorkspacesMapper { formik: FormikProps; responseRobot: any; isImportRobot?: boolean; } -export default function CFWorkspaces({ +export default function CFWorkspacesMapper({ formik, responseRobot, isImportRobot, -}: ICFWorkspaces): ReactElement { +}: ICFWorkspacesMapper): ReactElement { const { robotData } = useCreateRobot(); return ( diff --git a/src/components/CreateForms/CreateRobotFormStep2.tsx b/src/components/CreateForms/CreateRobotFormStep2.tsx index 5fa920ec..0155a4f7 100644 --- a/src/components/CreateForms/CreateRobotFormStep2.tsx +++ b/src/components/CreateForms/CreateRobotFormStep2.tsx @@ -3,10 +3,10 @@ import { envOnPremiseFleet, envOnPremiseRobot, } from "../../helpers/envProvider"; -import CreateRobotFormCancelButton from "../CFCancelButton/CFCancelButton"; +import CFCancelButton from "../CFCancelButton/CFCancelButton"; import { CreateEnvironmentFormStep2Validations } from "../../validations/EnvironmentsValidations"; import CFLoader from "../CFLoader/CFLoader"; -import CFWorkspaces from "../CFWorkspaces/CFWorkspaces"; +import CFWorkspacesMapper from "../CFWorkspacesMapper/CFWorkspacesMapper"; import { CreateRobotFormStep2Validations } from "../../validations/RobotsValidations"; import { IRobotWorkspaces } from "../../interfaces/robotInterfaces"; import { createEnvironment } from "../../toolkit/EnvironmentSlice"; @@ -279,7 +279,7 @@ export default function CreateRobotFormStep2({ } formik={formik} > - - {!(envOnPremiseRobot && url?.robotName ? true : false) && ( + {!(envOnPremiseRobot && url?.robotName) && (
{!isImportRobot && ( - + )}