Add guest push notifications and queue alerts

This commit is contained in:
Codex Agent
2025-11-12 20:38:49 +01:00
parent 2c412e3764
commit 574aa47ce7
34 changed files with 1806 additions and 74 deletions

View File

@@ -0,0 +1,24 @@
type PushConfig = {
enabled: boolean;
vapidPublicKey: string | null;
};
type RuntimeConfig = {
push: PushConfig;
};
export function getRuntimeConfig(): RuntimeConfig {
const raw = typeof window !== 'undefined' ? window.__GUEST_RUNTIME_CONFIG__ : undefined;
return {
push: {
enabled: Boolean(raw?.push?.enabled),
vapidPublicKey: raw?.push?.vapidPublicKey ?? null,
},
};
}
export function getPushConfig(): PushConfig {
return getRuntimeConfig().push;
}