Skip to content

Commit

Permalink
fix(QuickIssue): close QuickIssue panel after submit new issue
Browse files Browse the repository at this point in the history
fix #100
  • Loading branch information
azu committed May 4, 2019
1 parent 6ecee21 commit 5958d1b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ export class QuickIssueContainer extends BaseContainer<QuickIssueContainerProps,
this.useCase(new CloseQuickIssueUseCase()).execute();
};

onSubmit = (issueURL: string, title: string, body: string) => {
this.useCase(new OpenGitHubIssueUseCase()).execute(issueURL, title, body);
onSubmit = async (issueURL: string, title: string, body: string) => {
try {
await this.useCase(new OpenGitHubIssueUseCase()).execute(issueURL, title, body);
} finally {
await this.useCase(new CloseQuickIssueUseCase()).execute();
}
};

render() {
Expand Down

0 comments on commit 5958d1b

Please sign in to comment.