From 42bbb67639ea66ba7e1ca034a6a28fef7057a25b Mon Sep 17 00:00:00 2001 From: powermaker450 Date: Mon, 9 Sep 2024 19:00:27 -0400 Subject: [PATCH] Don't let the user close the endpoint dialog window if the endpoint is an invalid URL --- src/components/EndpointDialong.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/EndpointDialong.tsx b/src/components/EndpointDialong.tsx index a7be90a..63f433d 100644 --- a/src/components/EndpointDialong.tsx +++ b/src/components/EndpointDialong.tsx @@ -24,6 +24,10 @@ const EndpointDialog = ({ endpoint }: EndpointDialogProps) => { }; const closeSettings = () => { + if (error) { + return; + } + setOpen(false); setError(false); @@ -78,9 +82,9 @@ const EndpointDialog = ({ endpoint }: EndpointDialogProps) => { /> - - -