From 0669ad77d37f946793fd14e8ede19652a4bef3e5 Mon Sep 17 00:00:00 2001 From: Chaim Lev-Ari Date: Wed, 8 Mar 2023 02:27:34 +0200 Subject: [PATCH] fix(home): disable live connect for async [EE-5000] (#8462) --- app/react/components/buttons/Button.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/react/components/buttons/Button.tsx b/app/react/components/buttons/Button.tsx index f45d8b0e3..acd9d4f61 100644 --- a/app/react/components/buttons/Button.tsx +++ b/app/react/components/buttons/Button.tsx @@ -63,7 +63,11 @@ export function Button({ type={type} disabled={disabled} className={clsx(`btn btn-${color}`, sizeClass(size), className)} - onClick={onClick} + onClick={(e) => { + if (!disabled) { + onClick?.(e); + } + }} title={title} // eslint-disable-next-line react/jsx-props-no-spreading {...ariaProps}