add mobx observer and inject

This commit is contained in:
Matheus Breguêz
2020-07-01 09:14:21 -03:00
parent 19d01ed575
commit 35270cd104

View File

@ -1,5 +1,6 @@
// @flow // @flow
import * as React from "react"; import * as React from "react";
import { observer, inject } from "mobx-react";
import { Helmet } from "react-helmet"; import { Helmet } from "react-helmet";
import AuthStore from "stores/AuthStore"; import AuthStore from "stores/AuthStore";
@ -12,7 +13,7 @@ type Props = {
const { auth } = this.props; const { auth } = this.props;
const { team } = auth; const { team } = auth;
const PageTitle = ({ title, favicon }: Props) => ( const PageTitle = observer(({ auth, title, favicon }: Props) => (
<Helmet> <Helmet>
<title>{`${title} - ${team.name} | Outline` | `${title} - Outline`}</title> <title>{`${title} - ${team.name} | Outline` | `${title} - Outline`}</title>
<link <link
@ -25,4 +26,4 @@ const PageTitle = ({ title, favicon }: Props) => (
</Helmet> </Helmet>
); );
export default PageTitle; export default inject("auth")(PageTitle);