forked from p15670423/monkey
Island: Deduplicate <p> in renderFileEncryptionStats()
This commit is contained in:
parent
3e2cf1d69c
commit
1f1b9bf2fc
|
@ -2,11 +2,14 @@ import React from 'react';
|
||||||
|
|
||||||
|
|
||||||
function renderFileEncryptionStats(successful: number, total: number) {
|
function renderFileEncryptionStats(successful: number, total: number) {
|
||||||
if(successful > 0){
|
let textClassName = ""
|
||||||
return (<p className={"text-success"}>{successful} out of {total}</p>);
|
if(successful > 0) {
|
||||||
|
textClassName = "text-success"
|
||||||
} else {
|
} else {
|
||||||
return (<p className={"text-danger"}>{successful} out of {total}</p>);
|
textClassName = "text-danger"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (<p className={textClassName}>{successful} out of {total}</p>);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default renderFileEncryptionStats;
|
export default renderFileEncryptionStats;
|
||||||
|
|
Loading…
Reference in New Issue