almost all ready
This commit is contained in:
@@ -37,6 +37,12 @@ func (e *Engine) Category(w http.ResponseWriter, r *http.Request, data viewmodel
|
||||
return streamComponent(r.Context(), w, component)
|
||||
}
|
||||
|
||||
func (e *Engine) Cart(w http.ResponseWriter, r *http.Request, data viewmodel.CartPageData) error {
|
||||
startHTMLStream(w)
|
||||
component := templates.CartPage(data, e.assets.CSSPath("app.css"), e.assets.JSPath("app.js"))
|
||||
return streamComponent(r.Context(), w, component)
|
||||
}
|
||||
|
||||
func startHTMLStream(w http.ResponseWriter) {
|
||||
if w == nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user