import TextInputArea from '@/components/TextInputArea'; import { formatByteSize } from '@/utils/textStatistics'; import { useI18n } from '@/utils/chromeI18n'; import { useTextStatistics } from './useTextStatistics'; import { cn } from '@/lib/utils'; export default function Index() { const { t } = useI18n('textStatistics'); const { text, stats, setText } = useTextStatistics(); const statItems = [ { label: t('textStatistics:characters'), value: stats.characters }, { label: t('textStatistics:words'), value: stats.words }, { label: t('textStatistics:lines'), value: stats.lines }, { label: t('textStatistics:bytes'), value: formatByteSize(stats.bytes) }, ]; return (
{statItems.map((item) => (
{item.label} {item.value}
))}
); }