import PublicLayout from '../../components/PublicLayout.jsx' import PageHeader from '../../components/PageHeader.jsx' import { Loading, ErrorState } from '../../components/PageState.jsx' import { useAsync } from '../../lib/useAsync.js' import { api } from '../../api/client.js' export default function Status() { const { loading, error, data } = useAsync(() => api.status()) const mode = data?.mode || 'live' const statusMessage = data?.status_message || '' const isLive = mode === 'live' const stats = [ { value: isLive ? 'Live' : 'Maint.', label: 'Site mode' }, { value: isLive ? 'Open' : 'Closed', label: 'Public login' }, { value: statusMessage || '—', label: 'Latest note' }, ] return (
{loading && } {error && } {!loading && !error && ( <>
{isLive ? 'Live — the gates are open' : 'Maintenance — building in progress'} {statusMessage || (isLive ? 'The shard is online.' : 'The gates are closed while we shape the world. Public login is not open yet.')}
{stats.map((s) => (
{s.value}
{s.label}
))}
)}
) }