import { storage } from "./libs"; import { CONSTANTS } from "./main"; const createTemplate = (data: { searchCount: string }) => `
${data.searchCount} ${data.searchCount === "1" ? "search" : "searches"}

${CONSTANTS.CUTIES.NOTFOUND[Math.floor(Math.random() * CONSTANTS.CUTIES.NOTFOUND.length)]}

404 Page not found

`; export default function notFoundPageRender() { const searchCount = storage.get(CONSTANTS.LOCAL_STORAGE_KEYS.SEARCH_COUNT) || "0"; const app = document.querySelector("#app"); if (!app) throw new Error("App element not found"); app.innerHTML = createTemplate({ searchCount, }); }