(null)
const [setupCheckAttempt, setSetupCheckAttempt] = useState(0)
useEffect(() => {
let cancelled = false
checkSetupStatus()
.then(status => {
if (cancelled) return
setBootstrapped(status.bootstrapped)
})
.catch(err => {
if (cancelled) return
setSetupError(err instanceof Error ? err.message : 'Failed to check setup status')
})
.finally(() => {
if (!cancelled) setCheckingSetup(false)
})
return () => {
cancelled = true
}
}, [setupCheckAttempt])
if (bootstrapped === null && checkingSetup) {
return (
loading...
)
}
if (bootstrapped === null && setupError) {
return (
{setupError}
)
}
if (!bootstrapped) {
return (
} />
{
setSetupError(null)
setBootstrapped(true)
}}
/>
}
/>
)
}
return (
} />
} />
} />
}>
} />
} />
} />
} />
} />
} />
} />
} />
} />
)
}
function AppRoutes() {
return demoMode ? :
}
export default function App() {
return (
{demoMode && }
)
}