refactor
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"reichard.io/antholume/pkg/sliceutils"
|
||||
"reichard.io/antholume/web/components/ui"
|
||||
"reichard.io/antholume/web/models"
|
||||
"reichard.io/antholume/web/pages/layout"
|
||||
)
|
||||
|
||||
var _ Page = (*Progress)(nil)
|
||||
@@ -16,14 +17,15 @@ type Progress struct {
|
||||
Data []models.Progress
|
||||
}
|
||||
|
||||
func (Progress) Route() PageRoute { return ProgressPage }
|
||||
|
||||
func (p Progress) Render() g.Node {
|
||||
return h.Div(
|
||||
h.Class("overflow-x-auto"),
|
||||
func (p *Progress) Generate(ctx models.PageContext) (g.Node, error) {
|
||||
return layout.Layout(
|
||||
ctx.WithRoute(models.ProgressPage),
|
||||
h.Div(
|
||||
h.Class("inline-block min-w-full overflow-hidden rounded shadow"),
|
||||
ui.Table(p.buildTableConfig()),
|
||||
h.Class("overflow-x-auto"),
|
||||
h.Div(
|
||||
h.Class("inline-block min-w-full overflow-hidden rounded shadow"),
|
||||
ui.Table(p.buildTableConfig()),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user