Skip to content

Commit 7e79895

Browse files
authored
kie-issues#131: Clear error state on CreateGit and CreateGist modal close (#2411)
1 parent 59cda3c commit 7e79895

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGistOrSnippetModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,10 @@ If you are, it means that creating this Snippet failed and it can safely be dele
245245
variant={ModalVariant.medium}
246246
aria-label={i18n.createGistOrSnippetModal[authProvider.type].create}
247247
isOpen={props.isOpen}
248-
onClose={props.onClose}
248+
onClose={() => {
249+
setError(undefined);
250+
props.onClose();
251+
}}
249252
title={i18n.createGistOrSnippetModal[authProvider.type].create}
250253
titleIconVariant={switchExpression(authProvider.type, {
251254
bitbucket: BitbucketIcon,

packages/online-editor/src/editor/Toolbar/GitIntegration/CreateGitRepositoryModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,10 @@ export function CreateGitRepositoryModal(props: {
255255
variant={ModalVariant.medium}
256256
aria-label={i18n.createGitRepositoryModal[authProvider.type].createRepository}
257257
isOpen={props.isOpen}
258-
onClose={props.onClose}
258+
onClose={() => {
259+
setError(undefined);
260+
props.onClose();
261+
}}
259262
title={i18n.createGitRepositoryModal[authProvider.type].createRepository}
260263
titleIconVariant={switchExpression(authProvider.type, {
261264
bitbucket: BitbucketIcon,

0 commit comments

Comments
 (0)