fix(mock): allow mock Tesla in production builds (already owner-gated for real data)

This commit is contained in:
2026-05-31 23:13:22 +01:00
parent a90c8a9354
commit b125f9a723
+3 -1
View File
@@ -24,7 +24,9 @@ export function isMockEnabled(): boolean {
export function getMockScenario(): MockScenario | null {
if (typeof window === 'undefined') return null;
if (import.meta.env.PROD) return null; // never in prod build
// Mock is allowed in production too: it only paints the UI with fake data,
// it never reaches the (owner-gated) Fleet API. The visible MOCK chip in
// the top bar makes the state obvious.
const urlParam = new URLSearchParams(window.location.search).get('mockTesla');
if (urlParam === 'off') {