refactor(login): remove unused param
This commit is contained in:
parent
a737b466e2
commit
20fb3255f1
2 changed files with 2 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue