<commit_before>import React, { useEffect } from 'react';
import { Modal } from 'react-bootstrap';
import { CSSTransition } from 'react-transition-group';

import { useForceUpdate } from 'core/presentation/hooks';

import { TaskMonitor } from './TaskMonitor';
import { TaskMonitorError } from './TaskMonitorError';
import { TaskMonitorStatus } from './TaskMonitorStatus';

export interface ITaskMonitorProps {
  monitor: TaskMonitor;
}

export const TaskMonitorWrapper = ({ monitor }: ITaskMonitorProps) => {
  const forceUpdate = useForceUpdate();

  useEffect(() => {
    const subscription = monitor?.statusUpdatedStream.subscribe(() => forceUpdate());
    return () => subscription?.unsubscribe();
  }, [monitor]);

  if (!monitor || (!monitor.submitting && !monitor.error)) {
    return null;<commit_msg>fix(deck): Handles an undefined reference on `TaskMonitorWrapper`. (#9031)<commit_after>import React, { useEffect } from 'react';
import { Modal } from 'react-bootstrap';
import { CSSTransition } from 'react-transition-group';

import { useForceUpdate } from 'core/presentation/hooks';

import { TaskMonitor } from './TaskMonitor';
import { TaskMonitorError } from './TaskMonitorError';
import { TaskMonitorStatus } from './TaskMonitorStatus';

export interface ITaskMonitorProps {
  monitor: TaskMonitor;
}

export const TaskMonitorWrapper = ({ monitor }: ITaskMonitorProps) => {
  const forceUpdate = useForceUpdate();

  useEffect(() => {
    const subscription = monitor?.statusUpdatedStream?.subscribe(() => forceUpdate());
    return () => subscription?.unsubscribe();
  }, [monitor]);

  if (!monitor || (!monitor.submitting && !monitor.error)) {
    return null;
{'fraction_non_alphanumeric': 0.14421930870083433, 'fraction_numerical': 0.0023837902264600714, 'mean_word_length': 5.195571955719557, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '5526808', 'n_tokens_mistral': 454, 'n_tokens_neox': 440, 'n_words': 118}