diff --git a/esp/src/src-react/components/Frame.tsx b/esp/src/src-react/components/Frame.tsx index 58967d6ff4d..60355ee8def 100644 --- a/esp/src/src-react/components/Frame.tsx +++ b/esp/src/src-react/components/Frame.tsx @@ -91,7 +91,7 @@ export const Frame: React.FunctionComponent = () => { }, []); React.useEffect(() => { - document.title = `${showEnvironmentTitle && environmentTitle.length ? environmentTitle : "ECL Watch "}${locationPathname.split("/").join(" | ")}`; + document.title = `${(showEnvironmentTitle && environmentTitle) ? environmentTitle : "ECL Watch "}${locationPathname.split("/").join(" | ")}`; }, [environmentTitle, locationPathname, showEnvironmentTitle]); React.useEffect(() => { diff --git a/esp/src/src-react/components/Title.tsx b/esp/src/src-react/components/Title.tsx index 9af34dfa076..ff235f3b50d 100644 --- a/esp/src/src-react/components/Title.tsx +++ b/esp/src/src-react/components/Title.tsx @@ -247,11 +247,6 @@ export const DevTitle: React.FunctionComponent = ({ } }, [currentUser]); - React.useEffect(() => { - if (!environmentTitle) return; - document.title = environmentTitle; - }, [environmentTitle]); - return
@@ -264,7 +259,7 @@ export const DevTitle: React.FunctionComponent = ({ - {showEnvironmentTitle && environmentTitle.length ? environmentTitle : "ECL Watch"} + {(showEnvironmentTitle && environmentTitle) ? environmentTitle : "ECL Watch"}