From 32fabac0d37119bead06e569d3db8f140f7b5961 Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Mon, 29 Apr 2024 14:22:27 +0200 Subject: [PATCH] Handle Custom zap Modal clicks --- src/components/CustomZap/CustomZap.tsx | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/components/CustomZap/CustomZap.tsx b/src/components/CustomZap/CustomZap.tsx index 0e89d2d..ecd0004 100644 --- a/src/components/CustomZap/CustomZap.tsx +++ b/src/components/CustomZap/CustomZap.tsx @@ -141,9 +141,30 @@ const CustomZap: Component<{ props.onFail(selectedValue()); }; + let md = false; + return ( - props.onCancel({ amount: 0, message: '' })}> -
+ { + if (md) { + md = false; + } + else { + props.onCancel({ amount: 0, message: '' }); + } + }} + > +
md = false} + onMouseDown={() => md = true} + onClick={(e: MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + }} + >