// The result data will be passed from Flask template
// No need to retrieve from localStorage since Flask renders the page with data

// Back button logic
document.getElementById("backBtn").addEventListener("click", () => {
  window.location.href = "/";
});

// If you want to display additional client-side data from localStorage
const fileName = localStorage.getItem("uploadedFileName");
if (fileName) {
  const fileNameElement = document.getElementById("fileName");
  if (fileNameElement && fileNameElement.textContent === "Loading...") {
    fileNameElement.textContent = fileName;
  }
}