This commit is contained in:
Andras Schmelczer 2026-02-02 20:10:32 +00:00
parent 9179acd4cd
commit 2c613dc0d1
14 changed files with 376 additions and 188 deletions

View file

@ -1,5 +1,6 @@
const DOMAIN = 'narrowit.schmelczer.dev';
const ENDPOINT = '/status';
const IS_DEV = process.env.NODE_ENV !== 'production';
type EventOptions = {
props?: Record<string, string | number | boolean>;
@ -7,6 +8,8 @@ type EventOptions = {
};
function sendEvent(name: string, options?: EventOptions) {
if (IS_DEV) return;
const payload: Record<string, unknown> = {
n: name,
u: window.location.href,