<commit_before>import React from 'react';
import PropTypes from 'prop-types';

export default function FileList({ content, focused, handleClick, handleRename, handleDelete }) {
    const renderItem = (item, i) => {
        return (
            <tr key={i}>
                <td>
                    <img className="file-icon" src={require(`../../../images/file/${item.icon}`)} alt={item.icon} />
                </td>
                <td className="file-name">
                    <span onClick={() => handleClick(item)} className={i === focused ? 'focused' : ''}>
                        {item.short}
                    </span>
                    <span onClick={() => handleDelete(item)} className="file-info monospace float-right">
                        [x]
                    </span>
                    <span onClick={() => handleRename(item)} className="file-info monospace float-right">
                        [r]
                    </span>
                </td>
                <td className="file-info monospace hide-lt600 text-right">
                    <span>{item.size}</span>
                </td>
                <td className="file-info monospace hide-lt768">
                    <span>{item.perms}</span>
                </td>
                <td className="file-info monospace hide-lt768">
                    <span>{item.date}</span>
                </td>
            </tr>
        );
    };

    return (
        <table className="file-table">
            <thead>
                <tr>
                    <th>&nbsp;</th>
                    <th className="text-left">Filename</th>
                    <th className="hide-lt600">Size</th>
                    <th className="hide-lt768">Permissions</th>
                    <th className="hide-lt768">Uploaded</th><commit_msg>Align file size header right<commit_after>import React from 'react';
import PropTypes from 'prop-types';

export default function FileList({ content, focused, handleClick, handleRename, handleDelete }) {
    const renderItem = (item, i) => {
        return (
            <tr key={i}>
                <td>
                    <img className="file-icon" src={require(`../../../images/file/${item.icon}`)} alt={item.icon} />
                </td>
                <td className="file-name">
                    <span onClick={() => handleClick(item)} className={i === focused ? 'focused' : ''}>
                        {item.short}
                    </span>
                    <span onClick={() => handleDelete(item)} className="file-info monospace float-right">
                        [x]
                    </span>
                    <span onClick={() => handleRename(item)} className="file-info monospace float-right">
                        [r]
                    </span>
                </td>
                <td className="file-info monospace hide-lt600 text-right">
                    <span>{item.size}</span>
                </td>
                <td className="file-info monospace hide-lt768">
                    <span>{item.perms}</span>
                </td>
                <td className="file-info monospace hide-lt768">
                    <span>{item.date}</span>
                </td>
            </tr>
        );
    };

    return (
        <table className="file-table">
            <thead>
                <tr>
                    <th>&nbsp;</th>
                    <th className="text-left">Filename</th>
                    <th className="hide-lt600 text-right">Size</th>
                    <th className="hide-lt768">Permissions</th>
                    <th className="hide-lt768">Uploaded</th>
{'fraction_non_alphanumeric': 0.14707505518763797, 'fraction_numerical': 0.009933774834437087, 'mean_word_length': 1.3045136681500318, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 87, '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': '4656828', 'n_tokens_mistral': 975, 'n_tokens_neox': 892, 'n_words': 186}