From 709c97acfb0257b688370b5f7e825a6c961f48a7 Mon Sep 17 00:00:00 2001 From: log101 Date: Sun, 23 Jun 2024 13:11:06 +0300 Subject: [PATCH] feat: add error messages to forms --- src/components/CommentForm.astro | 41 +++++++++++++++++++++-- src/components/EmojiReactionForm.astro | 45 ++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 2 deletions(-) diff --git a/src/components/CommentForm.astro b/src/components/CommentForm.astro index 900a14e..bece347 100644 --- a/src/components/CommentForm.astro +++ b/src/components/CommentForm.astro @@ -26,7 +26,7 @@ const backendHost = import.meta.env.PUBLIC_BACKEND_HOST; hx-post=`${backendHost}/api/blog/comments` hx-target="#comments-container" hx-swap="afterbegin" - hx-on::after-request="document.getElementById('no-comments-text')?.remove();this.reset()"> + hx-on:htmx:after-request="document.getElementById('no-comments-text')?.remove();this.reset()">