From 30578a8c0db87330b2422057daf406bcd13e85a9 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 3 Aug 2022 12:25:17 -0400 Subject: [PATCH] fix: code clean Signed-off-by: James --- .../Launch/LaunchForm/LaunchFormInputs.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormInputs.tsx b/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormInputs.tsx index 668a5b41c..c389bd646 100644 --- a/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormInputs.tsx +++ b/packages/zapp/console/src/components/Launch/LaunchForm/LaunchFormInputs.tsx @@ -28,8 +28,6 @@ export function getComponentForInput( showErrors: boolean, setIsError: (boolean) => void, ) { - const props = { ...input, error: showErrors ? input.error : undefined, setIsError }; - const onChange = (newValue: InputValue) => { const helper = getHelperForInput(input.typeDefinition.type); try { @@ -41,22 +39,24 @@ export function getComponentForInput( input.onChange(newValue); }; + const props = { ...input, error: showErrors ? input.error : undefined, setIsError, onChange }; + switch (input.typeDefinition.type) { case InputType.Union: - return ; + return ; case InputType.Blob: - return ; + return ; case InputType.Collection: - return ; + return ; case InputType.Struct: - return ; + return ; case InputType.Map: - return ; + return ; case InputType.Unknown: case InputType.None: - return ; + return ; default: - return ; + return ; } }