Files
outline/app/components/PageTitle.js
2020-07-01 09:14:21 -03:00

30 lines
718 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>{`${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);