/
githubmirror
/
wp-calypso
Обзор
Документация
Войти
/
githubmirror
/
wp-calypso
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
client/hosting/performance/components/ReportError.tsx
31 строка
1 KB
Gergely Csécsey
Site Performance tool: improve error messages for timed out requests (#108564)
11 фев 2026, 20:20
Не верифицирован
11 фев 2026, 20:20
dae5dea
Код
Авторство
О чём код?
import { NoticeBanner } from '@automattic/components'; import { Button } from '@wordpress/components'; import { useTranslate } from 'i18n-calypso'; import InlineSupportLink from 'calypso/components/inline-support-link'; export const ReportError = ( { onRetestClick }: { onRetestClick(): void } ) => { const translate = useTranslate(); return ( <NoticeBanner level="warning" title={ translate( 'Results not available' ) } hideCloseButton actions={ [ <Button key="rerun-test" variant="primary" onClick={ onRetestClick }> { translate( 'Re-run test' ) } </Button>, ] } > { translate( 'We were unable to reliably load and test your page. This could be due to a timeout, server error, or connectivity issue. ' + 'Make sure your site is accessible and responding correctly. {{link}}Learn more about improving site speed{{/link}}, or try running the test again.', { components: { link: <InlineSupportLink supportContext="site-speed" showIcon={ false } />, }, } ) } </NoticeBanner> ); };