import React from 'react'; import { Loader2 } from 'lucide-react'; import { Button } from '@/components/ui/button'; const DEV_TENANT_KEYS = [ { key: 'lumen', label: 'Lumen Moments' }, { key: 'storycraft', label: 'Storycraft Weddings' }, { key: 'viewfinder', label: 'Viewfinder Studios' }, { key: 'pixel', label: 'Pixel & Co (dormant)' }, ] as const; declare global { interface Window { fotospielDemoAuth?: { clients: Record; loginAs: (tenantKey: string) => Promise; }; } } export function DevTenantSwitcher() { const helper = window.fotospielDemoAuth; const [loggingIn, setLoggingIn] = React.useState(null); if (!helper) { return null; } async function handleLogin(key: string) { if (!helper) return; setLoggingIn(key); try { await helper.loginAs(key); } catch (error) { console.error('[DevAuth] Switch failed', error); setLoggingIn(null); } } return (
Demo tenants Dev mode

Select a seeded tenant to mint OAuth tokens and jump straight into their admin space. Available only in development builds.

{DEV_TENANT_KEYS.map(({ key, label }) => ( ))}

Console: fotospielDemoAuth.loginAs('lumen')

); }