import { useParams, Link } from 'react-router-dom' import { Loading, ErrorState } from '../../../components/PageState.jsx' import CharacterSheet from '../../../components/CharacterSheet.jsx' import { useAsync } from '../../../lib/useAsync.js' import { api } from '../../../api/client.js' // A staff member's own character sheet inside the admin shell. Owner-checked — // the endpoint only returns a sheet for a character on the caller's linked account. export default function AdminCharacter() { const { serial } = useParams() const { loading, error, data } = useAsync(() => api.admin.shard.char(serial), [serial]) const restarting = error && error.status === 503 const forbidden = error && error.status === 403 return (

← Back to my characters

{loading && } {restarting && } {forbidden && } {error && !restarting && !forbidden && } {!loading && !error && data && }
) }