This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 7e79895e8ff kie-issues#131: Clear error state on CreateGit and 
CreateGist modal close (#2411)
7e79895e8ff is described below

commit 7e79895e8ffc678d7e21918b1b493e4c89a1a2ae
Author: Jozef Marko <[email protected]>
AuthorDate: Fri Jun 7 15:25:26 2024 +0200

    kie-issues#131: Clear error state on CreateGit and CreateGist modal close 
(#2411)
---
 .../src/editor/Toolbar/GitIntegration/CreateGistOrSnippetModal.tsx   | 5 ++++-
 .../src/editor/Toolbar/GitIntegration/CreateGitRepositoryModal.tsx   | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGistOrSnippetModal.tsx
 
b/packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGistOrSnippetModal.tsx
index b2b10f898d6..42870dea0cc 100644
--- 
a/packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGistOrSnippetModal.tsx
+++ 
b/packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGistOrSnippetModal.tsx
@@ -245,7 +245,10 @@ If you are, it means that creating this Snippet failed and 
it can safely be dele
       variant={ModalVariant.medium}
       aria-label={i18n.createGistOrSnippetModal[authProvider.type].create}
       isOpen={props.isOpen}
-      onClose={props.onClose}
+      onClose={() => {
+        setError(undefined);
+        props.onClose();
+      }}
       title={i18n.createGistOrSnippetModal[authProvider.type].create}
       titleIconVariant={switchExpression(authProvider.type, {
         bitbucket: BitbucketIcon,
diff --git 
a/packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGitRepositoryModal.tsx
 
b/packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGitRepositoryModal.tsx
index 3825a5f694c..a11ebde69c4 100644
--- 
a/packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGitRepositoryModal.tsx
+++ 
b/packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGitRepositoryModal.tsx
@@ -255,7 +255,10 @@ export function CreateGitRepositoryModal(props: {
       variant={ModalVariant.medium}
       
aria-label={i18n.createGitRepositoryModal[authProvider.type].createRepository}
       isOpen={props.isOpen}
-      onClose={props.onClose}
+      onClose={() => {
+        setError(undefined);
+        props.onClose();
+      }}
       title={i18n.createGitRepositoryModal[authProvider.type].createRepository}
       titleIconVariant={switchExpression(authProvider.type, {
         bitbucket: BitbucketIcon,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to