import { Link, useParams } from 'react-router' import { useOne } from '@refinedev/core' import { Alert, Button, Card, CardContent, DetailList, PageHeader, PageState } from './lib/ui.jsx' import { useTitle } from './lib/hooks.js' function PendingOrError({ pending, error, children }) { if (pending) return if (error) return {error.message} return children } export function AttemptDetail() { const { id } = useParams() const { result, error, isPending } = useOne({ resource: 'attempts', id, queryOptions: { retry: false } }) const attempt = result useTitle('CreatorHub · Attempt 详情') return ( {attempt ? ( {attempt.id}} /> {attempt.browser_env_alias || '未记录'} · {attempt.network_exit_id || '未记录'} · {attempt.binding_version || '未记录'}], ]} /> 返回任务 查看审计 {attempt.browser_env_alias ? 查看环境 : null} {attempt.network_exit_id ? 查看出口 : null} ) : null} ) }