refactor(login): remove unused param

This commit is contained in:
ayn2op 2025-06-11 13:40:22 -04:00
parent a737b466e2
commit 20fb3255f1
2 changed files with 2 additions and 4 deletions

View file

@ -45,7 +45,7 @@ func newApplication(cfg *config.Config) *application {
func (a *application) show(token string) error {
if token == "" {
loginForm := login.NewForm(a.cfg, a.Application, func(token string) {
loginForm := login.NewForm(a.cfg, func(token string) {
if err := a.show(token); err != nil {
slog.Error("failed to show app", "err", err)
return

View file

@ -17,16 +17,14 @@ type DoneFn = func(token string)
type Form struct {
*tview.Pages
cfg *config.Config
app *tview.Application
form *tview.Form
done DoneFn
}
func NewForm(cfg *config.Config, app *tview.Application, done DoneFn) *Form {
func NewForm(cfg *config.Config, done DoneFn) *Form {
f := &Form{
Pages: tview.NewPages(),
cfg: cfg,
app: app,
form: tview.NewForm(),
done: done,
}