/
githubmirror
/
wp-calypso
Обзор
Документация
Войти
/
githubmirror
/
wp-calypso
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
client/hosting/performance/components/PerformanceReport.tsx
61 строка
1 KB
Volodymyr Makukha
Provide oportunity to retest Performance report if it takes too long (#105984)
26 сен 2025, 14:19
Не верифицирован
26 сен 2025, 14:19
b1524d3
Код
Авторство
О чём код?
import { PerformanceReport as PerformanceReportObject } from 'calypso/data/site-profiler/types'; import { PerformanceProfilerDashboardContent } from 'calypso/performance-profiler/components/dashboard-content'; import { PerformanceReportLoading } from './PerformanceReportLoading'; import { ReportError } from './ReportError'; interface PerformanceReportProps { performanceReport?: PerformanceReportObject; url: string; hash: string; isLoading: boolean; isError: boolean; isRetesting: boolean; onRetestClick(): void; pageTitle?: string; filter?: string; onFilterChange?( fitler: string ): void; } export const PerformanceReport = ( { isLoading, isRetesting, isError, onRetestClick, performanceReport, url, hash, pageTitle, filter, onFilterChange, }: PerformanceReportProps ) => { if ( isError ) { return <ReportError onRetestClick={ onRetestClick } />; } if ( isRetesting || isLoading ) { return ( <PerformanceReportLoading isSavedReport={ ! isRetesting && !! hash } pageTitle={ pageTitle } onRetestClick={ onRetestClick } /> ); } if ( ! performanceReport ) { return null; } return ( <PerformanceProfilerDashboardContent performanceReport={ performanceReport } url={ url } hash={ hash } overallScoreIsTab filter={ filter } displayNewsletterBanner={ false } displayMigrationBanner={ false } onRecommendationsFilterChange={ onFilterChange } /> ); };