fix(index): don't re-render posts on click

This commit is contained in:
Barrett Ruth 2024-06-15 14:35:56 -05:00
parent 2a8c3194d1
commit 73f7d90fa6

View file

@ -56,6 +56,7 @@ let typing = false;
function typechars(e) {
e.preventDefault();
if (e.target.classList.contains("active")) return;
if (typing) return;
typing = true;
@ -119,6 +120,8 @@ document.addEventListener("DOMContentLoaded", function () {
topic.addEventListener("click", (e) => {
e.preventDefault();
if (topic.classList.contains("active")) return;
topics.forEach((t) => {
t.classList.remove("active");
t.style.color = "";