import { Alert, Button, Descriptions, Space } from 'antd'; import { Link } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { api } from '../api/client'; import { PageHeader } from './ResourcePage'; type ChannelRow = { id?: string; inboxEnabled?: string; mobileImSdk?: string; online?: number; note?: string; }; export default function MessagesChannelPage() { const q = useQuery({ queryKey: ['/system/message-channel'], queryFn: () => api.get('/system/message-channel'), }); const rows = ((q.data as { data?: ChannelRow[] })?.data || q.data || []) as ChannelRow[]; const row = rows[0] || {}; return ( <> } /> {row.inboxEnabled || '已开启'} {row.mobileImSdk || '已启用'} {typeof row.online === 'number' ? `${row.online} 人` : '—'} {row.note || '—'} ); }