Yōten: A social tracker for your language learning journey built on the atproto.

feat: fix cancel button from reply

authored by brookjeynes.dev and committed by

Tangled bed94483 264b0d14

+8 -4
+1 -2
internal/server/views/partials/comment-feed.templ
··· 19 19 if params.NextPage > 0 { 20 20 <div 21 21 id="next-feed-segment" 22 - hx-get={ templ.SafeURL(fmt.Sprintf("/%s/session/%s/feed?page=%d", params.StudySessionDid, 23 - params.StudySessionRkey, params.NextPage)) } 22 + hx-get={ templ.SafeURL(fmt.Sprintf("/%s/session/%s/feed?page=%d", params.StudySessionDid, params.StudySessionRkey, params.NextPage)) } 24 23 hx-trigger="revealed" 25 24 hx-swap="outerHTML" 26 25 >
+7 -2
internal/server/views/partials/new-reply.templ
··· 1 1 package partials 2 2 3 3 templ NewReply(params NewReplyProps) { 4 - <div class="flex flex-col gap-3" x-init="lucide.createIcons()"> 4 + <div id="new-reply-form" class="flex flex-col gap-3" x-init="lucide.createIcons()"> 5 5 <form 6 6 hx-post="/comment/new" 7 7 hx-swap="outerHTML" ··· 28 28 <button type="submit" id="reply-button" class="btn btn-primary w-fit"> 29 29 Reply 30 30 </button> 31 - <button type="button" id="cancel-button" class="btn btn-muted w-fit"> 31 + <button 32 + type="button" 33 + id="cancel-button" 34 + class="btn btn-muted w-fit" 35 + @click="$el.closest('#new-reply-form').remove()" 36 + > 32 37 Cancel 33 38 </button> 34 39 </div>