import TextInputArea from '@/components/TextInputArea'; import { formatBytes } from '@/utils/format'; import { cn } from '@/lib/utils'; import { useTextStatistics } from './useTextStatistics'; export default function Index() { const { text, stats, setText } = useTextStatistics(); const statItems = [ { label: '字符数', value: stats.characters }, { label: '单词数', value: stats.words }, { label: '行数', value: stats.lines }, { label: '字节大小', value: formatBytes(stats.bytes) }, ]; return (