import React from 'react'; import { Card, Typography, Tabs, TabPane, Button, } from '@douyinfe/semi-ui'; import { Code, FileText, Zap, Clock, X, } from 'lucide-react'; import { useTranslation } from 'react-i18next'; const DebugPanel = ({ debugData, activeDebugTab, onActiveDebugTabChange, styleState, onCloseDebugPanel, }) => { const { t } = useTranslation(); return (
{t('调试信息')}
{/* 移动端关闭按钮 */} {styleState.isMobile && onCloseDebugPanel && (
{t('请求体')}
} itemKey="request">
{debugData.request ? (
                  {JSON.stringify(debugData.request, null, 2)}
                
) : ( {t('暂无请求数据')} )}
{t('响应内容')} } itemKey="response">
{debugData.response ? (
                  {debugData.response}
                
) : ( {t('暂无响应数据')} )}
{debugData.timestamp && (
{t('最后更新')}: {new Date(debugData.timestamp).toLocaleString()}
)}
); }; export default DebugPanel;