From 8ca83406850435efcb8a7596d84d48e85e337843 Mon Sep 17 00:00:00 2001 From: YouweiPeng <98921666+YouweiPeng@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:26:40 -0700 Subject: [PATCH] try this reload if works --- frontend/scripts/home.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/scripts/home.js b/frontend/scripts/home.js index 26ac985..48eadac 100644 --- a/frontend/scripts/home.js +++ b/frontend/scripts/home.js @@ -181,6 +181,7 @@ document.addEventListener("DOMContentLoaded", function() { } } likePost(); + window.location.reload(); break; case "comment": console.log("comment is clicked"); @@ -340,6 +341,7 @@ document.addEventListener("DOMContentLoaded", function() { cancelDelete.onclick = () => { confirmationDialog.style.display = "none"; }; + window.location.reload(); }; const editBtn = document.createElement("button"); editBtn.textContent = "Edit"; @@ -367,6 +369,7 @@ document.addEventListener("DOMContentLoaded", function() { cancelEdit.onclick = () => { editModal.style.display = "none"; }; + window.location.reload(); }; postNavList.appendChild(buttondiv); }