fix(mock): allow mock Tesla in production builds (already owner-gated for real data)
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user