package post import ( "net/http" "github.com/aerogo/aero" "github.com/animenotifier/notify.moe/arn" "github.com/animenotifier/notify.moe/components" ) // ReplyUI renders a new post area. func ReplyUI(ctx aero.Context) error { id := ctx.Get("id") user := arn.GetUserFromContext(ctx) post, err := arn.GetPost(id) if err != nil { return ctx.Error(http.StatusNotFound, "Post not found", err) } return ctx.HTML(components.NewPostArea(post, user, "Reply") + components.NewPostActions(post, true)) }