From 800544cfbaceac5fcdaa93a07f4c1400f998c727 Mon Sep 17 00:00:00 2001 From: Himanshu Singh Date: Mon, 11 Dec 2023 14:27:24 +0100 Subject: [PATCH] chore: also empty error when closing the modal --- src/views/webview-app/use-connection-form.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/webview-app/use-connection-form.ts b/src/views/webview-app/use-connection-form.ts index 9883b10bc..e24ca73b9 100644 --- a/src/views/webview-app/use-connection-form.ts +++ b/src/views/webview-app/use-connection-form.ts @@ -32,7 +32,10 @@ export default function useConnectionForm() { connectionFormOpened, connectionErrorMessage, openConnectionForm: () => setConnectionFormOpened(true), - closeConnectionForm: () => setConnectionFormOpened(false), + closeConnectionForm: () => { + setConnectionFormOpened(false); + setConnectionErrorMessage(''); + }, handleConnectClicked: (connectionInfo: ConnectionInfo) => { const nextAttemptId = uuidv4(); setConnectionAttemptId(nextAttemptId);