package routes import ( "fmt" "github.com/LazyBachelor/LazyPM/internal/models" "github.com/LazyBachelor/LazyPM/pkg/web/components" "github.com/LazyBachelor/LazyPM/pkg/web/components/base" ) type DashboardProps struct { Issues []*models.Issue SelectedIssue *models.Issue BaseURL string QueryParam string EmptyText string } templ Dashboard(props DashboardProps) { @BaseLayout() { @DashboardContent(props) } } templ DashboardContent(props DashboardProps) { {{ selectedID := "" if props.SelectedIssue != nil { selectedID = props.SelectedIssue.ID } issuesJSON, _ := templ.JSONString(props.Issues) xData := fmt.Sprintf(`{ selectedId: %q, issues: %s }`, selectedID, issuesJSON) }}
Create your first issue to get started.