Skip to content

Commit 7658667

Browse files
committed
refactor: remove unused conditional statements
1 parent d561872 commit 7658667

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

js/main.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,11 @@ document.addEventListener("DOMContentLoaded", function () {
2020
e.preventDefault();
2121
const target = link.getAttribute("href");
2222

23-
let defaultContent = document.querySelector("#content").innerHTML;
2423
let contentHTML;
2524
if (target === "/") {
26-
// contentHTML = defaultContent;
2725
const res = await fetch("pages/home.html");
2826
contentHTML = await res.text();
2927
window.history.pushState({ page: "home" }, "Home", "/");
30-
} else if (target === "/Mission") {
31-
const res = await fetch("pages/mission.html");
32-
contentHTML = await res.text();
33-
window.history.pushState({ page: "mission" }, "Mission", "/mission");
34-
} else if (target === "/Projects") {
35-
const res = await fetch("pages/projects.html");
36-
contentHTML = await res.text();
37-
window.history.pushState({ page: "projects" }, "Projects", "/projects");
3828
} else if (target === "/Blogs") {
3929
const res = await fetch("pages/blogs.html");
4030
console.log(target);

0 commit comments

Comments
 (0)