Island: Move renderFileEncryptionStats to FileEncryptionTable.tsx

This commit is contained in:
Mike Salvatore 2021-07-13 11:26:07 -04:00
parent 77754cb4ff
commit 5aa5facf1f
2 changed files with 12 additions and 16 deletions

View File

@ -1,15 +0,0 @@
import React from 'react';
function renderFileEncryptionStats(successful: number, total: number) {
let textClassName = ""
if(successful > 0) {
textClassName = "text-success"
} else {
textClassName = "text-danger"
}
return (<p className={textClassName}>{successful} out of {total}</p>);
}
export default renderFileEncryptionStats;

View File

@ -1,7 +1,6 @@
import React from 'react';
import ReactTable from 'react-table';
import {renderArray} from '../common/RenderArrays';
import renderFileEncryptionStats from "../common/renderFileEncryptionStats";
type Props = {
@ -51,5 +50,17 @@ const columns = [
}
];
function renderFileEncryptionStats(successful: number, total: number) {
let textClassName = ''
if(successful > 0) {
textClassName = 'text-success'
} else {
textClassName = 'text-danger'
}
return (<p className={textClassName}>{successful} out of {total}</p>);
}
export default FileEncryptionTable;