Skip to content

Commit

Permalink
fix: changed astro event to page load
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Penaque committed Sep 4, 2023
1 parent 45eb19b commit 5d9179d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ import SideMenu from "../components/Side/SideMenu.astro";
}
</script>
<script>
document.addEventListener("astro:after-swap", () => {
document.addEventListener("astro:page-load", () => {
for (const el of document.querySelectorAll(".el-to-fade")) {
setTimeout(() => {
el.classList.remove("scale-90");
}, 200);
el.classList.remove("scale-90");
}
});
</script>
Expand Down

0 comments on commit 5d9179d

Please sign in to comment.