accounts-frontend/packages/app/components/auth/AuthTitle.tsx

23 lines
518 B
TypeScript
Raw Permalink Normal View History

import React, { FC } from 'react';
import { Helmet } from 'react-helmet-async';
2019-12-07 16:58:52 +05:30
import { FormattedMessage as Message, MessageDescriptor } from 'react-intl';
2016-05-14 16:56:17 +05:30
interface Props {
title: MessageDescriptor;
}
const AuthTitle: FC<Props> = ({ title }) => {
2020-05-24 04:38:24 +05:30
return (
<Message {...title}>
{(msg) => (
<span>
{msg}
<Helmet title={msg as string} />
</span>
)}
</Message>
);
};
export default AuthTitle;