forked from p15670423/monkey
Island: Move renderFileEncryptionStats to FileEncryptionTable.tsx
This commit is contained in:
parent
77754cb4ff
commit
5aa5facf1f
|
@ -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;
|
|
|
@ -1,7 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTable from 'react-table';
|
import ReactTable from 'react-table';
|
||||||
import {renderArray} from '../common/RenderArrays';
|
import {renderArray} from '../common/RenderArrays';
|
||||||
import renderFileEncryptionStats from "../common/renderFileEncryptionStats";
|
|
||||||
|
|
||||||
|
|
||||||
type Props = {
|
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;
|
export default FileEncryptionTable;
|
||||||
|
|
Loading…
Reference in New Issue