<commit_before>import React from 'react';

import Header from './Header';

import styles from './Section.module.css';

interface SectionProps {
  kind: string;
  label: string;
}

const Section: React.FC<SectionProps> = ({ kind, label, children }) => (
  children && (
    <div data-test-id={`output-${kind}`}>
      <Header label={label} />
      <pre><code className={styles.code}>{children}</code></pre>
    </div>
  )
);<commit_msg>Fix TS typing errors in the Section component<commit_after>import React from 'react';

import Header from './Header';

import styles from './Section.module.css';

interface SectionProps {
  kind: string;
  label: string;
}

const Section: React.FC<SectionProps> = ({ kind, label, children }) => (
  React.Children.count(children) === 0 ? null : (
    <div data-test-id={`output-${kind}`}>
      <Header label={label} />
      <pre><code className={styles.code}>{children}</code></pre>
    </div>
  )
);
{'fraction_non_alphanumeric': 0.18230277185501065, 'fraction_numerical': 0.0010660980810234541, 'mean_word_length': 3.8402061855670104, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7635453', 'n_tokens_mistral': 293, 'n_tokens_neox': 293, 'n_words': 73}