package web

import (
	"log"
	"net/http"
)

func IndexWebHandler(w http.ResponseWriter, r *http.Request) {
	component := Index()
	err := component.Render(r.Context(), w)
	if err != nil {
		http.Error(w, err.Error(), http.StatusBadRequest)
		log.Printf("Error rendering in IndexWebHandler: %e", err)
	}
}
