Skip to content

Commit

Permalink
Add support link to site monitoring page (Automattic#80955)
Browse files Browse the repository at this point in the history
Co-authored-by: Kateryna Kodonenko <kateryna@automattic.com>
  • Loading branch information
katinthehatsite and Kateryna Kodonenko authored Aug 25, 2023
1 parent 46feee0 commit ab96054
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 4 additions & 0 deletions client/components/inline-support-link/context-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ const contextLinks = {
link: 'https://wordpress.com/support/webmaster-tools/',
post_id: 5022,
},
'site-monitoring': {
link: 'https://wordpress.com/support/site-monitoring/',
post_id: 259521,
},
};

export default contextLinks;
17 changes: 15 additions & 2 deletions client/my-sites/site-monitoring/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useI18n } from '@wordpress/react-i18n';
import { translate } from 'i18n-calypso';
import { useState } from 'react';
import DocumentHead from 'calypso/components/data/document-head';
import FormattedHeader from 'calypso/components/formatted-header';
import InlineSupportLink from 'calypso/components/inline-support-link';
import Main from 'calypso/components/main';
import PageViewTracker from 'calypso/lib/analytics/page-view-tracker';
import { SiteMonitoringTabPanel } from './components/site-monitoring-tab-panel';
Expand All @@ -28,8 +30,19 @@ export function SiteMetrics() {
className="site-monitoring__formatted-header modernized-header"
align="left"
headerText={ titleHeader }
subHeaderText={ __(
'Real time information to troubleshoot or debug problems with your site.'
subHeaderText={ translate(
'Real time information to troubleshoot or debug problems with your site. {{learnMoreLink}}Learn more{{/learnMoreLink}}.',
{
components: {
learnMoreLink: (
<InlineSupportLink
key="learnMore"
supportContext="site-monitoring"
showIcon={ false }
/>
),
},
}
) }
></FormattedHeader>
<SiteMonitoringTabPanel selectedTab={ page } onSelected={ handleTabSelected }>
Expand Down

0 comments on commit ab96054

Please sign in to comment.