summaryrefslogtreecommitdiff
path: root/components/index.html
diff options
context:
space:
mode:
authorGrail Finder (aider) <wohilas@gmail.com>2025-04-05 16:32:59 +0300
committerGrail Finder (aider) <wohilas@gmail.com>2025-04-05 16:32:59 +0300
commit1d052c05fdc627b4d5efb306c1f3344c2c1bd8c9 (patch)
tree5b1178892fc858dd675659e43a82fa1eec96214d /components/index.html
parent685da156ee8cb6b07c9eef6301b439b56823dfc3 (diff)
feat: add next question button functionality
Diffstat (limited to 'components/index.html')
-rw-r--r--components/index.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/components/index.html b/components/index.html
index b51c0e3..f0f18f0 100644
--- a/components/index.html
+++ b/components/index.html
@@ -20,6 +20,16 @@
<div class="wrong-answer">Try Again</div>
{{end}}
<div class="explanation">{{.Explanation}}</div>
+ {{if .ShowNext}}
+ <button
+ hx-get="/next-question?current_id={{.ID}}"
+ hx-target="#ancestor"
+ hx-swap="outerHTML"
+ class="next-button"
+ data-testid="next-button">
+ Next Question →
+ </button>
+ {{end}}
</div>
<div id="options">
<button