Files
outline/app/components/PageTitle.js
Matheus Rocha Vieira d2c7f3f166 Update app/components/PageTitle.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-07-08 14:48:14 -03:00

32 lines
738 B
JavaScript

// @flow
import * as React from "react";
import { observer, inject } from "mobx-react";
import { Helmet } from "react-helmet";
import AuthStore from "stores/AuthStore";
type Props = {
title: string,
favicon?: string,
auth: AuthStore,
};
const { auth } = this.props;
const { team } = auth;
const PageTitle = observer(({ auth, title, favicon }: Props) => (
<Helmet>
<title>
{team ? `${title} - ${team.name} - Outline` : `${title} - Outline`}
</title>
<link
rel="shortcut icon"
type="image/png"
href={favicon || "/favicon-32.png"}
sizes="32x32"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</Helmet>
));
export default inject("auth")(PageTitle);