This commit is contained in:
Korbs 2024-07-13 16:09:21 -04:00
parent 3bbd99cc79
commit de5a61cd40

View file

@ -23,21 +23,21 @@ const op = new OpenpanelSdk({
clientSecret: 'sec_107558407af59a591b50',
});
// Track Event
if (Astro.cookies.get("Telemtry").value === "Enabled") {
op.event('Error', { Error: error instanceof Error ? error.message : 'Unknown error' });
}
else if (Astro.cookies.get("Telemtry").value === "Disabled") {
null
}
// // Track Event
// if (Astro.cookies.get("Telemtry").value === "Enabled") {
// op.event('Error', { Error: error instanceof Error ? error.message : 'Unknown error' });
// }
// else if (Astro.cookies.get("Telemtry").value === "Disabled") {
// null
// }
// Cookies
if (Astro.cookies.get("Telemtry").value === "Enabled") {
var UserIsOptedIn = true
}
else if (Astro.cookies.get("Telemtry").value === "Disabled") {
var UserIsOptedIn = false
}
// // Cookies
// if (Astro.cookies.get("Telemtry").value === "Enabled") {
// var UserIsOptedIn = true
// }
// else if (Astro.cookies.get("Telemtry").value === "Disabled") {
// var UserIsOptedIn = false
// }
---
<Head Title='MinPluto' Description={Description}/>
@ -47,11 +47,11 @@ else if (Astro.cookies.get("Telemtry").value === "Disabled") {
<p>An error has occured:</p>
<p>{error instanceof Error ? error.message : 'Unknown error'}</p>
</div>
{UserIsOptedIn ?
<!-- {UserIsOptedIn ?
<a href="https://dashboard.openpanel.dev/share/overview/OCbxiJ">The error has been reported</a>
:
null
}
} -->
<slot/>
</div>