Skip to content

Commit

Permalink
Merge pull request #18370 from GordonSmith/HPCC-31387-ENV_TITLE_ISSUE
Browse files Browse the repository at this point in the history
HPCC-31387 ECL Watch failing to display

Reviewed-By: Jeremy Clements <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Mar 5, 2024
2 parents d3a5014 + 20ff325 commit 8c8662c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion esp/src/src-react/components/Frame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const Frame: React.FunctionComponent<FrameProps> = () => {
}, []);

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(() => {
Expand Down
7 changes: 1 addition & 6 deletions esp/src/src-react/components/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,6 @@ export const DevTitle: React.FunctionComponent<DevTitleProps> = ({
}
}, [currentUser]);

React.useEffect(() => {
if (!environmentTitle) return;
document.title = environmentTitle;
}, [environmentTitle]);

return <div style={{ backgroundColor: titlebarColorSet ? titlebarColor : theme.palette.themeLight }}>
<BannerMessageBar />
<Stack horizontal verticalAlign="center" horizontalAlign="space-between">
Expand All @@ -264,7 +259,7 @@ export const DevTitle: React.FunctionComponent<DevTitleProps> = ({
<Link href="#/activities">
<Text variant="large" nowrap block >
<b title="ECL Watch" style={{ color: titlebarColorSet ? Utility.textColor(titlebarColor) : theme.palette.themeDarker }}>
{showEnvironmentTitle && environmentTitle.length ? environmentTitle : "ECL Watch"}
{(showEnvironmentTitle && environmentTitle) ? environmentTitle : "ECL Watch"}
</b>
</Text>
</Link>
Expand Down

0 comments on commit 8c8662c

Please sign in to comment.