/**
 * DashboardSpeed component.
 *
 * Site Kit by Google, Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * WordPress dependencies
 */
import { Fragment } from '@wordpress/element';
import { __ } from '@wordpress/i18n';

/**
 * Internal dependencies
 */
import Data from 'googlesitekit-data';
import DashboardModuleHeader from '../../../components/dashboard/dashboard-module-header';
import DashboardPageSpeed from '../components/DashboardPageSpeed';
import { STORE_NAME } from '../../../googlesitekit/datastore/site/constants';
const { useSelect } = Data;

function DashboardSpeed() {
	const currentEntityURL = useSelect( ( select ) => select( STORE_NAME ).getCurrentEntityURL() );
	const description = currentEntityURL
		? __( 'How fast your page loads, how quickly people can interact with your content, and how stable your content is.', 'google-site-kit' )
		: __( 'How fast your home page loads, how quickly people can interact with your content, and how stable your content is.', 'google-site-kit' );

	return (
		<Fragment>
			<div id="googlesitekit-pagespeed-header" className="
					mdc-layout-grid__cell
					mdc-layout-grid__cell--span-12
				">
				<DashboardModuleHeader
					title={ __( 'Page Speed and Experience', 'google-site-kit' ) }
					description={ description }
				/>
			</div>
			<div className="
				mdc-layout-grid__cell
				mdc-layout-grid__cell--span-12
			">
				<DashboardPageSpeed />
			</div>
		</Fragment>
	);
}

export default DashboardSpeed;

@@ -1127,16 +1127,119 @@
 eed() %7B%0A
+%09const currentReferenceURL = useSelect( ( select ) =%3E select( STORE_NAME ).getCurrentReferenceURL() );%0A
 %09const c
@@ -1364,16 +1364,40 @@
 ntityURL
+ === currentReferenceURL
 %0A%09%09? __(

Update logic for pagespeed sub-heading with currentReferenceURL.