diff --git a/package.json b/package.json
index 372a1e5..da454f9 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "mini-site",
+ "name": "website",
"type": "module",
"version": "0.0.1",
"scripts": {
diff --git a/src/components/EncryptedContactView.astro b/src/components/EncryptedContactView.astro
index 5bccfa9..89777e6 100644
--- a/src/components/EncryptedContactView.astro
+++ b/src/components/EncryptedContactView.astro
@@ -165,6 +165,8 @@ function encryptString(input: string, difficultyPrefix = "0000") {
async function decryptData(e: Event) {
e.preventDefault();
+ console.log("decrypting data");
+
const detailsDiv = document.getElementById("details-div");
if (detailsDiv) {
const encryptedDetails = detailsDiv.dataset.encrypted;
@@ -229,8 +231,11 @@ function encryptString(input: string, difficultyPrefix = "0000") {
}
}
- const decodeBtn = document.getElementById("decode-btn");
- if (decodeBtn) {
- decodeBtn.addEventListener("click", decryptData);
- }
+ document.addEventListener("astro:page-load", () => {
+ const decodeBtn = document.getElementById("decode-btn");
+ if (decodeBtn) {
+ decodeBtn.addEventListener("click", decryptData);
+ console.log("Adding eventlistener");
+ }
+ });
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro
index a5d6eb8..ee47d07 100644
--- a/src/layouts/BaseLayout.astro
+++ b/src/layouts/BaseLayout.astro
@@ -9,7 +9,7 @@ import NavItem from "../components/NavItem.astro";
import Navbar from "../components/Navbar.astro";
import "@fontsource-variable/inter";
import interWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2";
-// import { ClientRouter } from "astro:transitions";
+import { ClientRouter } from "astro:transitions";
---
@@ -33,7 +33,7 @@ import interWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal
crossorigin="anonymous"
/>
-
+