Files
HealthLog/src/components/monitoring/bootstrap.tsx
T
Marc-André Bombeck 51c4a498d9 chore: remove the monitoring settings route and an unused query key
The root layout now reads the public monitoring switches while it
renders, so nothing calls GET /api/monitoring/settings any more (the
native client never did); the route and its unpublished entry in the
route coverage guard go. The Coach feedback card reads the AI quality
card's cell, which left queryKeys.adminCoachFeedback() without a reader.
2026-11-12 13:09:47 +01:00

31 lines
923 B
TypeScript

import { UmamiScript } from "@/components/monitoring/umami-script";
import { GlitchtipReporter } from "@/components/monitoring/glitchtip-reporter";
import type { PublicMonitoringSettings } from "@/lib/monitoring-settings";
/**
* Mounts the operator's analytics script and error reporter. The root layout
* reads the instance-wide switches on the server and passes them in, so no
* page load asks for three values the document render already has. `null`
* (the key-mismatch page) mounts nothing.
*/
export function MonitoringBootstrap({
settings,
}: {
settings: Pick<
PublicMonitoringSettings,
"umamiEnabled" | "umamiWebsiteId" | "glitchtipEnabled"
> | null;
}) {
if (!settings) return null;
return (
<>
<UmamiScript
enabled={settings.umamiEnabled}
websiteId={settings.umamiWebsiteId}
/>
<GlitchtipReporter enabled={settings.glitchtipEnabled} />
</>
);
}