Skip to content

Commit

Permalink
Fix: hide home report when first protect report scan initializing
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller committed Jan 16, 2025
1 parent 4fbfd3a commit af4ab90
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions projects/plugins/protect/src/js/routes/home/index.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +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 useScanStatusQuery, { isScanInProgress } from '../../data/scan/use-scan-status-query';
import HomeAdminSectionHero from './home-admin-section-hero';
import styles from './styles.module.scss';

Expand Down Expand Up @@ -34,8 +33,7 @@ const HomePage = () => {
[ status ]
);

const showReport =
!! status.lastChecked || SCAN_IN_PROGRESS_STATUSES.indexOf( status?.status ) >= 0;
const showReport = isScanInProgress( status );

return (
<AdminPage>
Expand Down

0 comments on commit af4ab90

Please sign in to comment.