Files
keikos.work/handlers/pages/dashboard.templ

26 lines
504 B
Plaintext

package pages
import (
"net/http"
"forge.capytal.company/capytalcode/project-comicverse/lib/router/rerrors"
"keikos.work/templates/layouts"
)
type Dashboard struct{}
templ (p *Dashboard) Component() {
@layouts.Page() {
<h1>Dashboard</h1>
<h2>Images</h2>
<form action="/images" method="post"></form>
}
}
func (p *Dashboard) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if err := p.Component().Render(r.Context(), w); err != nil {
rerrors.InternalError(err).ServeHTTP(w, r)
}
}