package renderer import ( "net/http" ) const dashboardMenu = "dashboard" func (renderer *Renderer) Dashboard(w http.ResponseWriter, r *http.Request, accounts []any, nbaccounts int) { files := renderer.ThemeConfig.GetStringSlice("views.dashboard.files") state := NewState(r, renderer.ThemeConfig, dashboardMenu) state.ViewState = map[string]any{ "beneficiaries": map[string]any{ "count": nbaccounts, "latest": accounts, }, } renderer.Render("dashboard", w, r, files, state) }