accounts-frontend/packages/app/components/auth/AuthTitle.tsx
2019-12-30 10:57:52 +02:00

17 lines
400 B
TypeScript

import React from 'react';
import { Helmet } from 'react-helmet-async';
import { FormattedMessage as Message, MessageDescriptor } from 'react-intl';
export default function AuthTitle({ title }: { title: MessageDescriptor }) {
return (
<Message {...title}>
{msg => (
<span>
{msg}
<Helmet title={msg as string} />
</span>
)}
</Message>
);
}