<commit_before>import { FC } from 'react';
import { Box } from '@mui/material';
import { injectIntl, WrappedComponentProps } from 'react-intl';
import DataTable from 'lib/components/core/layouts/DataTable';
import tableTranslations from 'lib/translations/table';
import { TableColumns, TableOptions } from 'types/components/DataTable';
import LinearProgressWithLabel from 'lib/components/core/LinearProgressWithLabel';
import { Link } from 'react-router-dom';
import { formatShortDateTime } from 'lib/moment';
import { VideoSubmissionListData } from 'types/course/videoSubmissions';
import Note from 'lib/components/core/Note';

interface Props extends WrappedComponentProps {
  videoSubmissions: VideoSubmissionListData[] | null;
}

const UserVideoSubmissionsTable: FC<Props> = (props) => {
  const { videoSubmissions, intl } = props;

  if (!videoSubmissions || videoSubmissions.length === 0) {
    return <Note message="This course has no video yet!" />;
  }

  const options: TableOptions = {
    download: false,
    filter: false,
    jumpToPage: true,
    pagination: true,
    print: false,
    rowsPerPage: 100,
    rowsPerPageOptions: [100],
    search: false,
    selectableRows: 'none',
    setTableProps: (): object => {
      return { size: 'small' };
    },
    // setRowProps: (_row, dataIndex, _rowIndex): Record<string, unknown> => {
    //   return {
    //     className: `course_user_${videoSubmissions[dataIndex].courseUserId}`,
    //   };
    // },
    viewColumns: false,
  };

  const columns: TableColumns[] = [
    {
      name: 'title',
      label: intl.formatMessage(tableTranslations.videoNAme),
      options: {
        alignCenter: false,
        sort: false,
      },
    },
    {
      name: 'id',
      label: intl.formatMessage(tableTranslations.status),
      options: {
        filter: false,
        sort: false,
        search: false,
        customBodyRenderLite: (dataIndex): JSX.Element => {
          const videoSubmissionUrl =
            videoSubmissions[dataIndex].videoSubmissionUrl;<commit_msg>refactor(user video table): remove commented code<commit_after>import { FC } from 'react';
import { Box } from '@mui/material';
import { injectIntl, WrappedComponentProps } from 'react-intl';
import DataTable from 'lib/components/core/layouts/DataTable';
import tableTranslations from 'lib/translations/table';
import { TableColumns, TableOptions } from 'types/components/DataTable';
import LinearProgressWithLabel from 'lib/components/core/LinearProgressWithLabel';
import { Link } from 'react-router-dom';
import { formatShortDateTime } from 'lib/moment';
import { VideoSubmissionListData } from 'types/course/videoSubmissions';
import Note from 'lib/components/core/Note';

interface Props extends WrappedComponentProps {
  videoSubmissions: VideoSubmissionListData[] | null;
}

const UserVideoSubmissionsTable: FC<Props> = (props) => {
  const { videoSubmissions, intl } = props;

  if (!videoSubmissions || videoSubmissions.length === 0) {
    return <Note message="This course has no video yet!" />;
  }

  const options: TableOptions = {
    download: false,
    filter: false,
    jumpToPage: true,
    pagination: true,
    print: false,
    rowsPerPage: 100,
    rowsPerPageOptions: [100],
    search: false,
    selectableRows: 'none',
    setTableProps: (): object => {
      return { size: 'small' };
    },
    viewColumns: false,
  };

  const columns: TableColumns[] = [
    {
      name: 'title',
      label: intl.formatMessage(tableTranslations.videoNAme),
      options: {
        alignCenter: false,
        sort: false,
      },
    },
    {
      name: 'id',
      label: intl.formatMessage(tableTranslations.status),
      options: {
        filter: false,
        sort: false,
        search: false,
        customBodyRenderLite: (dataIndex): JSX.Element => {
          const videoSubmissionUrl =
            videoSubmissions[dataIndex].videoSubmissionUrl;
{'fraction_non_alphanumeric': 0.12022414671421294, 'fraction_numerical': 0.003565970453387672, 'mean_word_length': 3.4726651480637813, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3407691', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1140, 'n_words': 273}