From 51b6fe60d8054e6b5a8a5d7deb065c109ebe1143 Mon Sep 17 00:00:00 2001 From: Andrew718PLTS Date: Fri, 27 Dec 2024 12:03:21 +0100 Subject: [PATCH] console.info({ SwapFormValues: values }) Fix: 'Connect Wallet' state on entering any values, naming and shortened if --- src/components/buttons/3DButton.tsx | 45 +++++++++++++++-------------- src/features/swap/SwapConfirm.tsx | 2 +- src/features/swap/SwapForm.tsx | 11 ++++--- src/features/swap/useSwapQuote.ts | 9 ++---- 4 files changed, 33 insertions(+), 34 deletions(-) diff --git a/src/components/buttons/3DButton.tsx b/src/components/buttons/3DButton.tsx index 7425eb0..c3c7564 100644 --- a/src/components/buttons/3DButton.tsx +++ b/src/components/buttons/3DButton.tsx @@ -2,48 +2,51 @@ import { PropsWithChildren } from 'react' type BaseButtonProps = { onClick?: () => void - error?: boolean - fullWidth?: boolean type?: 'button' | 'submit' | 'reset' - disabled?: boolean + isError?: boolean + isFullWidth?: boolean + isDisabled?: boolean + isAccountReady?: boolean } export const Button3D = ({ children, ...restProps }: PropsWithChildren) => { return <_3DButtonLink {...restProps}>{children} } -const _3DButtonLink = ({ - children, - error, - fullWidth, - onClick, - type, - disabled, -}: PropsWithChildren) => { +const _3DButtonLink = (props: PropsWithChildren) => { + const { + children, + onClick, + type = 'button', + isError, + isFullWidth, + isDisabled, + isAccountReady, + } = props return (