package pages

import (
	"net/http"

	"forge.capytal.company/capytalcode/project-comicverse/router/rerrors"
	"forge.capytal.company/capytalcode/project-comicverse/templates/layouts"
)

type Dashboard struct{}

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)
		return
	}
}

templ (p *Dashboard) Component() {
	@layouts.Page() {
		<div class="text-red">
			<p>Hello world</p>
			<p>test</p>
			<p>test</p>
		</div>
	}
}
