Skip to content

Commit

Permalink
feat(ui): Add error modal when no API key
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-mesiab authored and kmesiab committed Dec 7, 2023
1 parent 9894f53 commit a1356a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/dialog"

critic "github.com/kmesiab/ai-code-critic/internal"
"github.com/kmesiab/ai-code-critic/ui"
Expand All @@ -24,8 +25,13 @@ func main() {
onAPIKeySubmitButtonClickedHandler,
)

(*criticWindow.Window).ShowAndRun()
_, err := critic.GetConfig()

if err != nil {
dialog.ShowError(err, *criticWindow.Window)
}

(*criticWindow.Window).ShowAndRun()
}

func getCodeReview(prContents string) {
Expand Down

0 comments on commit a1356a9

Please sign in to comment.