import { Button, Empty } from 'antd'; import React from 'react'; import { trpc } from '../../../api/trpc'; import { MonitorHealthBar } from '../MonitorHealthBar'; import { useAllowEdit } from './useAllowEdit'; interface MonitorStatusPageProps { slug: string; } export const MonitorStatusPage: React.FC = React.memo( (props) => { const { slug } = props; const { data: info } = trpc.monitor.getPageInfo.useQuery({ slug, }); const allowEdit = useAllowEdit(info?.workspaceId); const monitorList = info?.monitorList ?? []; return (
{info?.title}
{allowEdit && }
Services
{info && (
{monitorList.length > 0 ? ( monitorList.map((item) => (
)) ) : ( )}
)}
); } ); MonitorStatusPage.displayName = 'MonitorStatusPage';