Files
outline/app/components/PageTitle.js
2020-06-29 17:01:34 -03:00

31 lines
694 B
JavaScript

// @flow
import * as React from "react";
import { Helmet } from "react-helmet";
import PoliciesStore from "stores/PoliciesStore";
import AuthStore from "stores/AuthStore";
type Props = {
title: string,
favicon?: string,
policies: PoliciesStore,
auth: AuthStore,
};
const { policies, auth } = this.props;
const { team } = auth;
const PageTitle = ({ title, favicon }: Props) => (
<Helmet>
<title>{`${title} - ${team.name}`}</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 PageTitle;