Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Broderick-Westrope committed Nov 14, 2024
1 parent 7a0bd72 commit 6ef91c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/tui/views/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"github.com/Broderick-Westrope/tetrigo/internal/tui/components"

"github.com/Broderick-Westrope/tetrigo/internal/tui"
"github.com/Broderick-Westrope/tetrigo/internal/tui/components/textinput"
"github.com/charmbracelet/bubbles/help"
"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
Expand Down Expand Up @@ -38,7 +37,7 @@ type menuItem struct {
}

func NewMenuModel(_ *tui.MenuInput) *MenuModel {
nameInput := textinput.NewTextInputModel("Enter your name", 20, 20)
nameInput := components.NewTextInputModel("Enter your name", 20, 20)
modePicker := components.NewHPickerModel([]components.KeyValuePair{
{Key: "Marathon", Value: tui.ModeMarathon},
{Key: "Sprint (40 Lines)", Value: tui.ModeSprint},
Expand Down Expand Up @@ -160,7 +159,7 @@ func (m MenuModel) startGame() (tea.Cmd, error) {
return nil, errInvalidValue
}
case "Name":
playerName = i.model.(textinput.TextInputModel).Child.Value()
playerName = i.model.(components.TextInputModel).Child.Value()
default:
return nil, fmt.Errorf("invalid item label: %q", i.label)
}
Expand Down

0 comments on commit 6ef91c4

Please sign in to comment.