This commit is contained in:
Tom Moor
2020-07-13 19:41:42 -07:00
parent e859e3b9e0
commit a53934a5c9
2 changed files with 18 additions and 17 deletions

View File

@ -97,7 +97,7 @@ class Layout extends React.Component<Props> {
return (
<Container column auto>
<Helmet>
<title>{team ? `${team.name} Outline` : "Outline"}</title>
<title>{team && team.name ? team.name : "Outline"}</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"

View File

@ -10,13 +10,13 @@ type Props = {
auth: AuthStore,
};
const { auth } = this.props;
const { team } = auth;
const PageTitle = observer(({ auth, title, favicon }: Props) => {
const { team } = auth;
const PageTitle = observer(({ auth, title, favicon }: Props) => (
return (
<Helmet>
<title>
{team ? `${title} - ${team.name} - Outline` : `${title} - Outline`}
{team && team.name ? `${title} - ${team.name}` : `${title} - Outline`}
</title>
<link
rel="shortcut icon"
@ -26,6 +26,7 @@ const PageTitle = observer(({ auth, title, favicon }: Props) => (
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</Helmet>
));
);
});
export default inject("auth")(PageTitle);