diff --git a/projects/plugins/protect/src/js/routes/home/index.jsx b/projects/plugins/protect/src/js/routes/home/index.jsx index d659d4eaf0f41..98e29b53714c7 100644 --- a/projects/plugins/protect/src/js/routes/home/index.jsx +++ b/projects/plugins/protect/src/js/routes/home/index.jsx @@ -1,6 +1,7 @@ import { AdminSection, Container, Col, ScanReport } from '@automattic/jetpack-components'; import { useMemo } from 'react'; import AdminPage from '../../components/admin-page'; +import { SCAN_IN_PROGRESS_STATUSES } from '../../constants'; import useScanStatusQuery from '../../data/scan/use-scan-status-query'; import HomeAdminSectionHero from './home-admin-section-hero'; import styles from './styles.module.scss'; @@ -33,20 +34,24 @@ const HomePage = () => { [ status ] ); + const showReport = !! status.lastChecked || SCAN_IN_PROGRESS_STATUSES.indexOf( status?.status ) >= 0; + return ( - - - - - - - + { showReport && ( + + + + + + + + ) } ); };