From 6622fc0ff5bc81949a55b04988fdba38bfb2191c Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 6 Jul 2021 10:10:33 -0400 Subject: [PATCH] Island: Do not set state from props in RansomwareReport --- .../components/report-components/RansomwareReport.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/RansomwareReport.js b/monkey/monkey_island/cc/ui/src/components/report-components/RansomwareReport.js index 31629fbf0..86ba1ebf4 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/RansomwareReport.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/RansomwareReport.js @@ -4,16 +4,8 @@ import ReportHeader, {ReportTypes} from './common/ReportHeader'; import ReportLoader from './common/ReportLoader'; class RansomwareReport extends React.Component { - - constructor(props) { - super(props); - this.state = { - report: props.report - }; - } - stillLoadingDataFromServer() { - return Object.keys(this.state.report).length === 0; + return Object.keys(this.props.report).length === 0; } generateReportContent() {