File size: 1,082 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
import React from 'react';
import Helmet from 'react-helmet-async';
type Props = {
title?: string,
description?: string,
image?: string,
children?: any,
type?: 'article',
};
export default ({ title, description, image, type, children }: Props) => {
return (
<Helmet>
<title>{title}</title>
<meta name="description" content={description} />
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<meta
name="twitter:image"
content={
image
? image
: 'https://spectrum.chat/img/apple-icon-144x144-precomposed.png'
}
/>
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:type" content={type || 'website'} />
<meta
property="og:image"
content={
image
? image
: 'https://spectrum.chat/img/apple-icon-144x144-precomposed.png'
}
/>
{children}
</Helmet>
);
};
|