From 40d3bae92c90b3592cc0549c6b6cb541d23e3d9d Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Thu, 17 Sep 2020 13:41:29 -0400 Subject: [PATCH 1/3] add title to hub --- app/templates/hub.html | 1 + 1 file changed, 1 insertion(+) diff --git a/app/templates/hub.html b/app/templates/hub.html index 25a9137b6..5b2869635 100644 --- a/app/templates/hub.html +++ b/app/templates/hub.html @@ -13,6 +13,7 @@ --> +Ghostery Hub From 6606d8f30a01b51738c68c67ff52082337bcc6b6 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Thu, 17 Sep 2020 14:16:21 -0400 Subject: [PATCH 2/3] add title to upgrade pane --- _locales/en/messages.json | 3 +++ app/hub/Views/UpgradePlanView/UpgradePlanView.jsx | 3 +++ app/templates/hub.html | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 6447ba6c6..673b8fc22 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1351,6 +1351,9 @@ "hub_home_plus_full_protection": { "message": "You are fully protected!" }, + "hub_upgrade_page_title": { + "message": "Ghostery Hub - Upgrade Plan" + }, "hub_upgrade_your": { "message": "Upgrade your" }, diff --git a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx index d3515c418..335567df2 100644 --- a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx +++ b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx @@ -119,6 +119,9 @@ const premiumAlreadyProtectedButton = () => ( * @memberof HubComponents */ const UpgradePlanView = (props) => { + const title = t('hub_upgrade_page_title'); + window.document.title = title; + const { protection_level, show_yearly_prices, diff --git a/app/templates/hub.html b/app/templates/hub.html index 5b2869635..25a9137b6 100644 --- a/app/templates/hub.html +++ b/app/templates/hub.html @@ -13,7 +13,6 @@ --> -Ghostery Hub From 389ef166778dd82ac2899d43d97b8aa065a61436 Mon Sep 17 00:00:00 2001 From: Frank Chiarulli Jr Date: Fri, 18 Sep 2020 12:53:29 -0400 Subject: [PATCH 3/3] only set title once --- app/hub/Views/UpgradePlanView/UpgradePlanView.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx index 335567df2..3a3608965 100644 --- a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx +++ b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx @@ -11,7 +11,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0 */ -import React, { useRef, Fragment } from 'react'; +import React, { Fragment, useRef, useEffect } from 'react'; import ClassNames from 'classnames'; import PropTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; @@ -119,8 +119,10 @@ const premiumAlreadyProtectedButton = () => ( * @memberof HubComponents */ const UpgradePlanView = (props) => { - const title = t('hub_upgrade_page_title'); - window.document.title = title; + useEffect(() => { + const title = t('hub_upgrade_page_title'); + window.document.title = title; + }, []); const { protection_level,